Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Call / ICallService.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 #ifndef TIZENAPIS_API_ICALLSERVICE_H_
18 #define TIZENAPIS_API_ICALLSERVICE_H_
19
20 #include <string>
21 #include <vector>
22 #include <dpl/shared_ptr.h>
23 #include <Commons/ThreadPool.h>
24 #include "EventLaunchDialer.h"
25 #include "EventSendUSSD.h"
26
27 namespace TizenApis {
28 namespace Api {
29 namespace Call{
30
31 typedef std::vector<std::string> StringList;
32 typedef DPL::SharedPtr<StringList> StringListPtr;
33
34 class ICallService :
35         public WrtDeviceApis::Commons::EventRequestReceiver<EventLaunchDialer>,
36         public WrtDeviceApis::Commons::EventRequestReceiver<EventSendUSSD>
37 {
38 public:
39         ICallService();
40         virtual ~ICallService();
41
42         /**
43          * Asynchronously launches the native phone application for this call service with a pre-filled remote ID.
44          * The user still needs to press the call button to make the call.
45          */
46         virtual void launchDialer(const EventLaunchDialerPtr& event) = 0;
47
48         /**
49          * Send a USSD string to the network.
50          */
51         virtual void sendUSSD(const EventSendUSSDPtr& event) = 0;
52
53         /**
54          * Get voicemail numbers.
55          * @return A list of voicemail numbers.
56          */
57         virtual StringListPtr getVoicemailNumbers() = 0;
58
59         /**
60          * Get subscriber numbers.
61          * @return A list of subscriber numbers.
62          */
63         virtual StringListPtr getSubscriberNumbers() = 0;
64
65         /**
66          * Get emergency numbers.
67          * @return A list of emergency numbers.
68          */
69         virtual StringListPtr getEmergencyNumbers() = 0;
70
71 protected:
72         virtual void OnRequestReceived(const EventLaunchDialerPtr& event) = 0;
73
74         virtual void OnRequestReceived(const EventSendUSSDPtr& event) = 0;
75 };
76
77 typedef DPL::SharedPtr<ICallService> ICallServicePtr;
78
79 }
80 }
81 }
82
83 #endif