• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef CJ_CALENDAR_MANAGER_H
16 #define CJ_CALENDAR_MANAGER_H
17 
18 #include <cstdint>
19 #include <vector>
20 #include "cj_common_ffi.h"
21 #include "ffi_remote_data.h"
22 #include "calendar_manager_ffi.h"
23 #include "native_calendar.h"
24 #include "ability_runtime/cj_ability_context.h"
25 
26 namespace OHOS {
27 namespace CalendarApi {
28 
29 class CJCalendarManager : public OHOS::FFI::FFIData {
30     DECL_TYPE(CJCalendarManager, OHOS::FFI::FFIData)
31 public:
32     static void GetCalendarManager(int64_t contextId, int32_t* errcode);
33     static int64_t CreateCalendar(CCalendarAccount calendarAccount, int64_t* calendarId, int32_t* errcode);
34     static void DeleteCalendar(int64_t calendarId, int32_t* errcode);
35     static int64_t GetCalendar(CCalendarAccount calendarAccount, int64_t* calendarId, int32_t* errcode);
36     static CArrI64 GetAllCalendars(int32_t* errcode);
37     static int64_t EditerEvent(char* eventstr, int32_t* errcode);
38     static std::shared_ptr<AbilityRuntime::AbilityContext> GetAbilityContext(int32_t* errcode);
39 };
40 
41 }
42 }
43 
44 #endif // CJ_CALENDAR_MANAGER_H