• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_CLOUD_CLOUD_EVENT_H
17 #define OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_CLOUD_CLOUD_EVENT_H
18 
19 #include <string>
20 
21 #include "eventcenter/event.h"
22 #include "store/store_info.h"
23 
24 namespace OHOS::DistributedData {
25 class API_EXPORT CloudEvent : public Event {
26 public:
27     enum : int32_t {
28         FEATURE_INIT = EVT_CLOUD,
29         GET_SCHEMA,
30         LOCAL_CHANGE,
31         CLEAN_DATA,
32         CLOUD_SYNC,
33         DATA_CHANGE,
34         SET_SEARCHABLE,
35         CLOUD_SHARE,
36         MAKE_QUERY,
37         CLOUD_SYNC_FINISHED,
38         DATA_SYNC,
39         LOCK_CLOUD_CONTAINER,
40         UNLOCK_CLOUD_CONTAINER,
41         SET_SEARCH_TRIGGER,
42         CLOUD_BUTT
43     };
44 
45     CloudEvent(int32_t evtId, StoreInfo storeInfo);
46     ~CloudEvent() = default;
47     const StoreInfo &GetStoreInfo() const;
48     int32_t GetEventId() const;
49 
50 private:
51     int32_t eventId_;
52     StoreInfo storeInfo_;
53 };
54 } // namespace OHOS::DistributedData
55 #endif // OHOS_DISTRIBUTED_DATA_SERVICES_FRAMEWORK_CLOUD_CLOUD_EVENT_H