Fix smack dependency
[platform/framework/native/common-service.git] / inc / FApp_PackageManagerStub.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file         FApp_PackageManagerStub.h
20  * @brief       This is the header file of the _PackageManagerStub class.
21  *
22  * This header file contains the declarations of the _PackageManagerStub class.
23  */
24
25 #ifndef _FAPP_INTERNAL_PACKAGE_MANAGER_STUB_H_
26 #define _FAPP_INTERNAL_PACKAGE_MANAGER_STUB_H_
27
28
29 #include <FBaseObject.h>
30 #include <FBaseString.h>
31 #include <FAppTypes.h>
32
33 #include <FIo_IIpcServerEventListener.h>
34
35
36 namespace Tizen { namespace App { namespace Package {
37 class _PackageManagerImpl;
38 }}}
39
40 namespace Tizen { namespace App {
41
42 class _PackageManagerStub :
43         public Tizen::Base::Object,
44         public Tizen::Io::_IIpcServerEventListener
45 {
46
47 public:
48         _PackageManagerStub(void);
49         virtual ~_PackageManagerStub(void);
50         result Construct(void);
51
52         // ipc handlers.
53         void OnInstallPackage(const PackageId& packageId, const Tizen::Base::String& packagePath, int listener, result* pRes);
54         void OnUninstallPackage(const PackageId& packageId, int listener, result* pRes);
55
56 private:
57         _PackageManagerStub(const _PackageManagerStub& value);
58         _PackageManagerStub& operator =(const _PackageManagerStub& source);
59
60         // _IIpcServerEventListener
61         virtual void OnIpcServerStarted(const Tizen::Io::_IpcServer& server);
62         virtual void OnIpcServerStopped(const Tizen::Io::_IpcServer& server);
63         virtual void OnIpcClientConnected(const Tizen::Io::_IpcServer& server, int clientId);
64         virtual void OnIpcClientDisconnected(const Tizen::Io::_IpcServer&server, int clientId);
65         virtual void OnIpcRequestReceived(Tizen::Io::_IpcServer& server, const IPC::Message& message);
66
67         // internal
68         result StartIpcServer(void);
69
70 private:
71         Tizen::Io::_IpcServer* __pIpcServer;
72         Tizen::App::Package::_PackageManagerImpl* __pPackageManagerImpl;
73 };      //_PackageManagerStub
74
75 }} //Tizen::App
76
77 #endif // _FAPP_INTERNAL_PACKAGE_MANAGER_STUB_H_