feaf31090897043b6a6e636e2c25e564d3a391d2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Account / AccountFactory.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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. 
15  */
16
17 #include "AccountFactory.h"
18 #include "IAccountManager.h"
19 #include "IAccountService.h"
20 #include <Account/AccountManager.h>
21
22 using namespace TizenApis::Platform::Account;
23 namespace TizenApis {
24 namespace Api {
25 namespace Account{
26
27 IAccountManagerPtr AccountFactory::createAccountManagerObject()
28 {
29     LogDebug("entered");
30     IAccountManagerPtr result(new AccountManager());
31     return result;
32 }
33
34 //TODO: which is right, account or accountservice?
35 IAccountServicePtr AccountFactory::createAccountObject()
36 {
37     LogDebug("entered");
38     IAccountServicePtr result(new AccountService());
39     return result;
40 }
41
42 AccountFactory& AccountFactory::getInstance()
43 {
44     LogDebug("entered");
45     static AccountFactory theInstance;
46     return theInstance;
47 }
48
49
50 }
51 }
52 }