• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 
16 #ifndef INTERFACES_CJ_INCLUDE_I18N_HOLIDAY_IMPL_H_
17 #define INTERFACES_CJ_INCLUDE_I18N_HOLIDAY_IMPL_H_
18 
19 #include <string>
20 #include <vector>
21 #include "holiday_manager.h"
22 #include "ffi_remote_data.h"
23 #include "i18n_struct.h"
24 
25 namespace OHOS {
26 namespace Global {
27 namespace I18n {
28 class CHolidayManager : public OHOS::FFI::FFIData {
29     DECL_TYPE(CHolidayManager, FFIData)
30 public:
31     explicit CHolidayManager(char* icsPath);
32     ~CHolidayManager() = default;
33     std::vector<HolidayInfoItem> getHolidayInfoItemArray(int32_t year);
34     std::vector<HolidayInfoItem> getHolidayInfoItemArray();
35     bool isHoliday();
36     bool isHoliday(int32_t year, int32_t month, int32_t day);
37 private:
38    std::unique_ptr<HolidayManager> holidayManager_;
39 };
40 
41 }  // namespace I18n
42 }  // namespace Global
43 }  // namespace OHOS
44 
45 #endif  // INTERFACES_CJ_INCLUDE_I18N_HOLIDAY_IMPL_H_
46