d2b4a92e70c0247ab69ca359a253202e233e0741
[framework/web/wrt-plugins-common.git] / src / modules / API / Contact / EventGetAddressBookItemCount.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  * @author      Lukasz Marek (l.marek@samsung.com)
18  * @version     0.1
19  * @brief
20  */
21
22 #ifndef WRTDEVICEAPIS_CONTACT_EVENT_GET_ADDRESSBOOKITEM_COUNT_H_
23 #define WRTDEVICEAPIS_CONTACT_EVENT_GET_ADDRESSBOOKITEM_COUNT_H_
24
25 #include <dpl/shared_ptr.h>
26 #include <Commons/IEvent.h>
27
28 namespace WrtDeviceApis {
29 namespace Contact {
30 namespace Api {
31
32 /* Event sent while getting address books count */
33 class EventGetAddressBookItemCount :
34     public Commons::IEvent<EventGetAddressBookItemCount>
35 {
36     bool m_result;
37     unsigned int m_numberOfAddressBookItems;
38   public:
39     void setNumberOfAddressBookItems(unsigned int value)
40     {
41         m_numberOfAddressBookItems = value;
42     }
43     unsigned int     getNumberOfAddressBookItems() const
44     {
45         return m_numberOfAddressBookItems;
46     }
47     void setResult(bool value)
48     {
49         m_result = value;
50     }
51     bool getResult() const
52     {
53         return m_result;
54     }
55
56     EventGetAddressBookItemCount() : m_result(false),
57         m_numberOfAddressBookItems(0)
58     {
59     }
60     virtual ~EventGetAddressBookItemCount()
61     {
62     }
63     virtual void clearOnCancel()
64     {
65     }
66 };
67
68 typedef DPL::SharedPtr<EventGetAddressBookItemCount>
69 EventGetAddressBookItemCountPtr;
70
71 }
72 } // Api
73 } // WrtDeviceApis
74
75 #endif // WRTDEVICEAPIS_CONTACT_EVENT_GET_ADDRESSBOOKITEM_COUNT_H_