Git Init
[profile/ivi/wrt-plugins-tizen.git] / src / platform / Tizen / Messaging / SyncNetworkStatus.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License. 
15 */
16
17 /**
18  * @author          Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
19  */
20
21 #ifndef SYNCNETWORKSTATUS_H_
22 #define SYNCNETWORKSTATUS_H_
23
24 #include <string>
25 #include <dpl/noncopyable.h>
26 #include <dpl/shared_ptr.h>
27 #include <DBus/Message.h>
28
29 namespace TizenApis {
30 namespace Platform {
31 namespace Messaging {
32 class SyncNetworkStatus : private DPL::Noncopyable
33 {
34   public:
35     explicit SyncNetworkStatus(const DBus::MessagePtr& message);
36
37     int getStatus() const;
38     int getHandle() const;
39     std::string getSource() const;
40     int getMailId() const;
41     int getErrorCode() const;
42
43   private:
44     void initialize(const DBus::MessagePtr& message);
45
46   private:
47     int m_status;
48     int m_handle;
49     /*
50      * Not sure what it stores. According to source code of Email application
51      * it can contain string "ACTIVESYNC" or name of the file which stores body.
52      */
53     std::string m_source;
54     int m_mailId;
55     int m_errorCode;
56 };
57
58 typedef DPL::SharedPtr<SyncNetworkStatus> SyncNetworkStatusPtr;
59 }
60 }
61 }
62 #endif // SYNCNETWORKSTATUS_H_