// // Open Service Platform // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /** * @file PrivilegeHandler.h * @brief This is the header file for the PrivilegeHandler class. * * This header file contains the declarations of the PrivilegeHandler class. */ #ifndef _PRIVILEGE_HANDLER_H_ #define _PRIVILEGE_HANDLER_H_ #include namespace Tizen { namespace Base { namespace Collection { class IList; }}} namespace Tizen { namespace Base { class String; }} /** * @class PrivilegeHandler * @brief This class represents the class of PrivilegeHandler. * @since 2.1 * * This class represents the class of PrivilegeHandler. * */ class PrivilegeHandler { public: static result GenerateCipherPrivilege(const Tizen::App::AppId& appId, const Tizen::Base::Collection::IList& privilegeList, Tizen::Base::String& encryptedPrivileges, Tizen::Base::String& checksum); static result GenerateCipherPrivilege(const Tizen::App::AppId& appId, const Tizen::Base::Collection::IList& privilegeList, int visibilityLevel, Tizen::Base::String& encryptedPrivileges, Tizen::Base::String& checksum); private: static byte* PackPrivilegeN(const Tizen::Base::Collection::IList& privilegeList); static result PackPrivilegeN(const Tizen::Base::Collection::IList& privilegeList, int visibilityLevel, byte** ppBitwisePrivilege); static result GetEncryptedBitwise(byte* __bitwisePrivilege, Tizen::Base::String& encryptedPrivileges); static result GetChecksum(Tizen::App::AppId appId, byte* __bitwisePrivilege, Tizen::Base::String& checksum); }; // PrivilegeHandler #endif // _PRIVILEGE_HANDLER_H_