2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FApp_AppManagerProxy.h
19 * @brief This is the header file for the _AppManagerProxy class.
22 #ifndef _FAPP_INTERNAL_APP_MANAGER_PROXY_H_
23 #define _FAPP_INTERNAL_APP_MANAGER_PROXY_H_
25 #include <FBaseObject.h>
26 #include <FBaseColArrayList.h>
27 #include <FAppTypes.h>
28 #include <FOspConfig.h>
29 #include <FIo_IIpcClientEventListener.h>
30 #include "FApp_Types.h"
31 #include "FApp_IAppManager.h"
32 #include "FApp_AppManagerEvent.h"
34 namespace Tizen { namespace Io { class _IpcClient; } }
36 namespace Tizen { namespace App
39 class _IAppManagerEventListener;
40 class _IAppManagerServiceEventListener;
41 class _AppManagerEventArg;
43 class _IAppLifecycleEventListener;
46 class _OSP_EXPORT_ _AppManagerProxy
48 , public Tizen::Io::_IIpcClientEventListener
49 , public Tizen::Base::Object
52 virtual ~_AppManagerProxy(void);
54 virtual result TerminateApplication(const AppId& appId);
57 virtual result InitEventListener(_IAppManagerServiceEventListener* pListener);
59 virtual result AddEventListener(int clientId);
61 virtual result RemoveEventListener(int clientId);
63 virtual result RegisterApplication(const AppId& appId, _AppType appType, int pid);
65 virtual result UnregisterApplication(int pid);
67 virtual bool IsUserPreferredAppForAppControlResolution(const AppId& appId);
69 virtual result ClearUserPreferenceForAppControlResolution(const AppId& appId);
71 virtual result RegisterAppForAppLifecycleEvent(const AppId& appId, int clientId);
73 virtual result UnregisterAppForAppLifecycleEvent(const AppId& appId, int clientId);
75 static _IAppManager* GetService(void);
77 static void SetService(_IAppManager* pAppManager);
79 static void DeleteService(void);
82 _AppManagerProxy(void);
84 _AppManagerProxy(const _AppManagerProxy& value);
86 _AppManagerProxy& operator =(const _AppManagerProxy& source);
88 result Construct(void);
90 virtual void OnIpcResponseReceived(Tizen::Io::_IpcClient& client, const IPC::Message& message);
92 bool OnEventReceived(const Tizen::App::_AppManagerEventArg& arg);
93 void OnTerminateApplicationRequested(void);
94 void OnAppLifecycleEventReceived(const AppId& appId, int appLifecycleEventType);
97 static bool __isDeletable;
98 static _IAppManager* __pSelf;
99 Tizen::Io::_IpcClient* __pIpcClient;
100 static _IAppManagerServiceEventListener* __pServiceEventListener;
101 }; // _AppManagerProxy
105 #endif // _FAPP_INTERNAL_APP_MANAGER_PROXY_H_