2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 NfcMessageRegisterService.h
20 * @brief This is the header file for the %NfcMessageRegisterService class.
22 * This header file contains the declarations of the %NfcMessageRegisterService class.
25 #ifndef _NFC_MESSAGE_REGISTER_SERVICE_H_
26 #define _NFC_MESSAGE_REGISTER_SERVICE_H_
28 #include <FBaseResult.h>
29 #include <FBaseRtMutex.h>
30 #include <FBaseString.h>
31 #include <FBaseColLinkedListT.h>
32 #include <FIoDatabase.h>
33 #include <FAppPkgIPackageInstallationEventListener.h>
34 #include "FIo_IpcCommonDataTypes.h"
36 namespace Tizen { namespace Base
41 namespace Tizen { namespace Base { namespace Collection
47 * @class NfcMessageRegisterService
48 * @brief This class represents NFC service of the Connectivity service daemon.
52 * This class represents NFC service of the Connectivity service daemon.
54 class NfcMessageRegisterService
55 : public Tizen::App::Package::IPackageInstallationEventListener
58 NfcMessageRegisterService(void);
59 virtual ~NfcMessageRegisterService(void);
61 result Construct(void);
63 result RegisterPushMessage(const Tizen::Base::String& appPkgId,
64 const Tizen::Base::ByteBuffer& pushMessageBuffer, const Tizen::Base::String& description);
65 result UnregisterPushMessage(const Tizen::Base::String& appPkgId);
66 result GetReservedPushCandidates(Tizen::Io::_StringMap* pCandidates);
67 result PickReservedPushMessage(const Tizen::Base::String& ownerAppId);
69 // From IPackageInstallationEventListener;
70 virtual void OnPackageInstallationCompleted(const Tizen::App::PackageId& packageId,
71 Tizen::App::Package::PackageInstallationResult installationResult) {}
72 virtual void OnPackageUninstallationCompleted(const Tizen::App::PackageId& packageId, bool uninstallationResult);
73 virtual void OnPackageInstallationInProgress(const Tizen::App::PackageId& packageId, int progress) {}
76 result InitializeAppIdList(void);
77 result SetSelectedMessageAppId(const Tizen::Base::String& appId);
80 static const wchar_t* _SELECTED_APP_ID_NONE;
81 static const wchar_t* _META_DATA_DB_NAME;
82 static const wchar_t* _PUSH_MESSAGE_DIRECTORY;
83 static const wchar_t* _PUSH_MESSAGE_EXT_NAME;
86 Tizen::Io::Database __rsvdPushDb;
87 Tizen::Base::Runtime::Mutex __listMutex;
88 Tizen::Base::Collection::LinkedListT<Tizen::Base::String> __reserverList;
92 #endif // _NFC_MESSAGE_REGISTER_SERVICE_H_