Imported Upstream version 1.2.0
[platform/upstream/iotivity.git] / service / notification / android / notification-service / src / main / java / org / iotivity / service / ns / common / SyncInfo.java
1 //******************************************************************
2 //
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 package org.iotivity.service.ns.common;
22
23 import android.util.Log;
24
25 /**
26   * @class   SyncInfo
27   * @brief   This class provides implementation of Notification SyncInfo object.
28   */
29 public class SyncInfo
30 {
31     private static final String LOG_TAG = "NotificationService_SyncInfo";
32
33     public enum SyncType
34     {
35         UNREAD(0),
36         READ(1),
37         DELETED(2);
38         private int type;
39
40     private SyncType(int type)
41     {
42         this.type = type;
43     }
44
45     public int getSyncType()
46     {
47         return this.type;
48     }
49     };
50     public long mMessageId              = 0;
51     public String mProviderId           = null;
52     public SyncType mState              = SyncType.UNREAD;
53
54     public SyncInfo(long messageId, String providerId, SyncType state)
55     {
56         Log.i (LOG_TAG, "SyncInfo()");
57
58         mMessageId = messageId;
59         mProviderId = providerId;
60         mState = state;
61     }
62
63     public long getMessageId()
64     {
65         return mMessageId;
66     }
67
68     public String getProviderId()
69     {
70         return mProviderId;
71     }
72
73     public SyncType getState()
74     {
75         return mState;
76     }
77 }