b505efcded2b282c267288f436b073e64a9a2ae6
[framework/web/wrt-plugins-common.git] / src / modules / API / Contact / EventGetOwnerInfo.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  * @file        EventGetOwnerInfo.cpp
18  * @author      Lukasz Marek (l.marek@samsung.com)
19  * @version     0.1
20  * @brief
21  */
22
23 #ifndef WRTDEVICEAPIS_CONTACT_EVENT_GET_OWNER_INFO_H_
24 #define WRTDEVICEAPIS_CONTACT_EVENT_GET_OWNER_INFO_H_
25
26 #include <dpl/shared_ptr.h>
27 #include <Commons/IEvent.h>
28 #include <Contact/Contact.h>
29
30 namespace WrtDeviceApis {
31 namespace Contact {
32 namespace Api {
33
34 /* Event sent while getting phone's owner data */
35 class EventGetOwnerInfo : public Commons::IEvent<EventGetOwnerInfo>
36 {
37     bool m_result;
38     bool m_dataFound;
39     ContactPtr m_ownerInfo;
40   public:
41     void setOwnerInfo(const ContactPtr &value)
42     {
43         m_ownerInfo = value;
44     }
45     ContactPtr getOwnerInfo() const
46     {
47         return m_ownerInfo;
48     }
49     void setDataFound(bool value)
50     {
51         m_dataFound = value;
52     }
53     bool getDataFound() const
54     {
55         return m_dataFound;
56     }
57     void setResult(bool value)
58     {
59         m_result = value;
60     }
61     bool getResult() const
62     {
63         return m_result;
64     }
65     EventGetOwnerInfo() :
66         m_result(false),
67         m_dataFound(false)
68     {
69     }
70     virtual ~EventGetOwnerInfo()
71     {
72     }
73     virtual void clearOnCancel()
74     {
75     }
76 };
77
78 typedef DPL::SharedPtr<EventGetOwnerInfo> EventGetOwnerInfoPtr;
79
80 }
81 }
82 }
83
84 #endif // WRTDEVICEAPIS_CONTACT_EVENT_GET_OWNER_INFO_H_