2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FSys_SettingService.h
20 * @brief This is the header file of the _SettingService class.
22 * This header file contains the declarations of the _SettingService class.
26 #ifndef _FSYS_SETTING_SERVICE_INTERNAL_H_
27 #define _FSYS_SETTING_SERVICE_INTERNAL_H_
29 #include <unique_ptr.h>
32 #include <FBaseColArrayList.h>
33 #include <FBaseColHashMap.h>
34 #include <FBaseObject.h>
36 #include <FApp_IAppEventListener.h>
37 #include <FIo_IpcServer.h>
38 #include <FIo_IIpcServerEventListener.h>
39 #include <system-server/FSys_SettingInfo.h>
41 namespace Tizen { namespace System
45 : public Tizen::Base::Object
46 , public Tizen::App::_IAppEventListener
47 , public Tizen::Io::_IIpcServerEventListener
48 , public Tizen::System::ISettingInfoSetValueAsyncResultListener
49 , public Tizen::System::ISettingEventListener
55 static void InitSingleton(void);
56 static void DestroySingleton(void);
59 static _SettingService* GetInstance(void);
62 bool OnRequestOccured(const Tizen::Base::Collection::ArrayList& request, Tizen::Base::Collection::ArrayList* response);
63 void OnIpcRequestReceived(Tizen::Io::_IpcServer& server, const IPC::Message& message);
64 void OnIpcServerStarted(const Tizen::Io::_IpcServer& server);
65 void OnIpcServerStopped(const Tizen::Io::_IpcServer& server);
66 void OnIpcClientConnected(const Tizen::Io::_IpcServer& server, int clientId);
67 void OnIpcClientDisconnected(const Tizen::Io::_IpcServer&server, int clientId);
69 void OnApplicationLaunched(const Tizen::App::AppId& appId, int pid);
70 void OnApplicationTerminated(const Tizen::App::AppId& appId, int pid);
72 void OnResultReceivedForSetValueAsync(const Tizen::Base::String& key, result r);
73 void OnSettingChanged(Tizen::Base::String& key);
76 static _SettingService* __pSettingService;
77 Tizen::Io::_IpcServer __ipcServer;
78 Tizen::Base::String __serviceId;
79 _SettingInfo* __pSettingInfo;
80 Tizen::Base::Collection::HashMap __asyncList;
81 Tizen::Base::Collection::ArrayList __eventList;
82 Tizen::Base::Collection::ArrayList __eventListForInternal;
83 Tizen::Base::Collection::ArrayList __responseMessage;
85 Tizen::App::AppId __currentPkgId;