45e4ea57bb0c484e22ebd3b628bdc5b8f78f75cc
[apps/osp/Call.git] / inc / CallAppControlRequestMgr.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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  * @file                CallAppControlRequestMgr.h
19  * @brief               This is the header file for the %CallAppControlRequestMgr class.
20  *
21  * This header file contains the declarations for %CallAppControlRequestMgr class.
22  */
23 #ifndef _CALL_APPCONTROL_REQUEST_MGR_H_
24 #define _CALL_APPCONTROL_REQUEST_MGR_H_
25
26 class CallAppControlRequestMgr {
27
28 public:
29 //create a singleton instance
30 static CallAppControlRequestMgr* GetInstance(void);
31
32 private:
33         CallAppControlRequestMgr(void);
34         CallAppControlRequestMgr(CallAppControlRequestMgr& requestMgr);
35         virtual ~CallAppControlRequestMgr(void);
36         CallAppControlRequestMgr& operator =(const CallAppControlRequestMgr& requestMgr);
37
38         result Construct(void);
39         static void CreateInstance(void);
40         static void DestroyInstance(void);
41
42 public://methods
43
44         //Used to check if there is any AppControl request in progress.
45         bool IsAppControlRunning(void);
46         //Used to abort any running AppControl request.
47         void AbortAppControlRequest(void);
48         //Used to complete any running AppControl request.
49         void AppControlRequestCompleted(void);
50         //Used to make Message AppControl request to compose message.
51         bool LaunchComposeMessageAppControl(Tizen::Base::String& contactNumber, Tizen::App::IAppControlResponseListener* pListener);
52         //Used to make "ViewContact" AppControl request.
53         bool LaunchViewContactAppControl(Tizen::Base::String& contactId, Tizen::App::IAppControlResponseListener* pListener);
54         //Used to make "AddContact" AppControl request.
55         bool LaunchAddContactAppControl(Tizen::Base::String& contactNumber, Tizen::App::IAppControlResponseListener* pListener);
56         //Launch "Dialer" AppControl request.
57         bool LaunchDialerAppControl(Tizen::App::IAppControlResponseListener* pListener);
58
59 private:
60         static CallAppControlRequestMgr* __pInstance;
61         Tizen::App::AppControl* __pOpenedAppControl;
62 };
63
64 #endif // _CALL_APPCONTROL_REQUEST_MGR_H_