2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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://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>
35 // forward declarations
36 namespace Tizen { namespace Base
42 * @class NfcMessageRegisterService
43 * @brief This class represents NFC service of the Connectivity service daemon.
47 * This class represents NFC service of the Connectivity service daemon.
49 class NfcMessageRegisterService
50 : public Tizen::App::Package::IPackageInstallationEventListener
53 NfcMessageRegisterService(void);
54 virtual ~NfcMessageRegisterService(void);
56 result Construct(void);
58 result RegisterPushMessage(const Tizen::Base::String& appId, const Tizen::Base::ByteBuffer& pushMessageBuffer,
59 const Tizen::Base::String& description);
60 result UnregisterPushMessage(const Tizen::Base::String& appId);
62 // From IPackageInstallationEventListener;
63 virtual void OnPackageInstallationCompleted(const Tizen::App::PackageId& packageId, Tizen::App::Package::PackageInstallationResult installationResult) {}
64 virtual void OnPackageUninstallationCompleted(const Tizen::App::PackageId& packageId, bool uninstallationResult);
65 virtual void OnPackageInstallationInProgress(const Tizen::App::PackageId& packageId, int progress) {}
68 result InitializeAppIdList(void);
71 static const wchar_t* _META_DATA_DB_NAME;
72 static const wchar_t* _PUSH_MESSAGE_DIRECTORY;
73 static const wchar_t* _PUSH_MESSAGE_EXT_NAME;
76 Tizen::Io::Database __rsvdPushDb;
77 Tizen::Base::Runtime::Mutex __appIdListMutex;
78 Tizen::Base::Collection::LinkedListT<Tizen::Base::String> __reserverAppIdList;
82 #endif // _NFC_MESSAGE_REGISTER_SERVICE_H_