Update change log and spec for wrt-plugins-tizen_0.2.73
[profile/ivi/wrt-plugins-tizen.git] / src / platform / Tizen / Messaging / ISendingObserver.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 /**
19  *
20  *
21  * @file       ISendingObserver.h
22  * @author     Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
23  * @version    0.1
24  * @brief
25  */
26
27 #ifndef ISENDINGOBSERVER_H_
28 #define ISENDINGOBSERVER_H_
29
30 #include "CallbackMgr.h"
31
32 extern "C" {
33 #include <msg_transport_types.h>
34 }
35
36 namespace TizenApis {
37 namespace Platform {
38 namespace Messaging {
39
40 /*
41  *
42  */
43 class ISendingObserver
44 {
45   public:
46     ISendingObserver() : m_reqId(0)
47     {
48     }
49
50     virtual ~ISendingObserver()
51     {
52         if (m_reqId) {
53             CallbackMgrSingleton::Instance().unregister(m_reqId);
54         }
55     }
56
57     void setSendigRequestId(int id)
58     {
59         m_reqId = id;
60     }
61
62     void setRecipient(const char* arg)
63     {
64         m_recipient = arg;
65     }
66
67     std::string getRecipient() const
68     {
69         return m_recipient;
70     }
71
72 //    virtual void sendingCallback(msg_struct_t *sent_status) = 0;
73   virtual void sendingCallback(msg_struct_t sent_status) = 0;
74
75   private:
76     int m_reqId;
77     std::string m_recipient;
78 };
79 }
80 }
81 }
82 #endif /* ISENDINGOBSERVER_H_ */