1 //******************************************************************
\r
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
\r
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
7 // Licensed under the Apache License, Version 2.0 (the "License");
\r
8 // you may not use this file except in compliance with the License.
\r
9 // You may obtain a copy of the License at
\r
11 // http://www.apache.org/licenses/LICENSE-2.0
\r
13 // Unless required by applicable law or agreed to in writing, software
\r
14 // distributed under the License is distributed on an "AS IS" BASIS,
\r
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 // See the License for the specific language governing permissions and
\r
17 // limitations under the License.
\r
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
24 * This file contains Notification service SyncInfo representation.
\r
27 #ifndef _NS_SYNC_INFO_H_
\r
28 #define _NS_SYNC_INFO_H_
\r
31 #include "NSCommon.h"
\r
32 #include "oic_string.h"
\r
41 * @brief This class provides a set of APIs for Notification service SyncInfo .
\r
46 /** NSSyncType - enumeration for Notification service SyncType*/
\r
47 enum class NSSyncType
\r
51 NS_SYNC_DELETED = 2,
\r
55 * Constructor of NSSyncInfo.
\r
57 NSSyncInfo() = default;
\r
60 * Constructor of NSSyncInfo.
\r
62 * @param syncInfo - pointer to NSSyncInfo struct to initialize.
\r
64 NSSyncInfo(::NSSyncInfo *syncInfo);
\r
68 * Constructor of NSSyncInfo.
\r
70 * @param messageId - messageId of the Notification SyncInfo.
\r
71 * @param providerId - providerId of the Notification SyncInfo.
\r
72 * @param state - state of the Notification SyncInfo.
\r
74 NSSyncInfo(const uint64_t &messageId, const std::string &providerId,
\r
75 const NSSyncType &state)
\r
76 : m_messageId(messageId), m_providerId(providerId), m_state(state) {}
\r
79 * Destructor of NSSyncInfo.
\r
81 ~NSSyncInfo() = default;
\r
84 * This method is for getting Message Id from the Notification service sync info.
\r
86 * @return Id as uint64_t.
\r
88 uint64_t getMessageId() const;
\r
91 * This method is for getting Provider Id from the Notification service sync info.
\r
93 * @return Id as string.
\r
95 std::string getProviderId() const;
\r
98 * This method is for getting state from the Notification service sync info.
\r
100 * @return state as NSSyncType.
\r
102 NSSyncType getState() const;
\r
105 uint64_t m_messageId;
\r
106 std::string m_providerId;
\r
107 NSSyncType m_state;
\r
111 #endif /* _NS_SYNC_INFO_H_ */
\r