2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 * @file AccountWrapper.h
20 * @author Jihwa Park (jh7979.park@samsung.com)
25 #ifndef _TIZEN_ACCOUNT_WRAPPER_H_
26 #define _TIZEN_ACCOUNT_WRAPPER_H_
29 #include <dpl/shared_ptr.h>
30 #include <API/Account/EventAccount.h>
31 #include <API/Account/AccountServiceTypeProperty.h>
32 #include <API/Account/AccountServiceProviderProperty.h>
36 using namespace TizenApis::Api::Account;
37 using namespace WrtDeviceApis::Commons;
48 explicit AccountWrapper(const EventAccountPtr &event);
49 virtual ~AccountWrapper();
50 char *convertAbstractAccountToPlatformAccount();
51 EventAccountPtr convertPlatformAccountToAbstractAccount();
52 EventAccountPtr convertPlatformAccountToAbstractAccount(account_h account_info);
54 char *getPlatformAccount() const;
55 EventAccountPtr getAbstractAccount() const;
56 void freePlatformAccount();
58 void loadAccount(int id);
60 void getAccountbyId();
61 void getServiceTypebyId();
62 void getProviderbyId();
64 void findServiceTypes();
67 void setDummyServices();
68 AccountServiceTypePropertyPtr getDummyAccountServiceType();
69 AccountServiceProviderPropertyPtr getDummyAccountServiceProviderProperty();
72 int getIDFromPlatformAccount() const;
74 void setIDFromPlatformAccount();
75 void setIDToPlatformAccount();
77 void setDisplayNameFromPlatformAccount();
78 void setDisplayNameToPlatformAccount();
80 void setIconPathFromPlatformAccount();
81 void setIconPathToPlatformAccount();
83 void setProviderNameFromPlatformAccount();
84 void setProviderNameToPlatformAccount();
86 void setEmailAddressFromPlatformAccount();
87 void setEmailAddressToPlatformAccount();
89 void setDomainNameFromPlatformAccount();
90 void setDomainNameToPlatformAccount();
92 void setAccountServices();
93 void getAccountServices();
96 void displayAbstractAccount(); //only for debugging
97 void displayPlatformAccount(); //only for debugging
99 account_h m_platformAccount;
100 EventAccountPtr m_abstractAccount;
102 // static std::map<std::string, std::string> attrSvcMap;
106 typedef DPL::SharedPtr<AccountWrapper> AccountWrapperPtr;