2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FNet_NetAccountDatabase.h
19 * @brief This is the header file for the %_NetAccountDatabase class.
21 * This header file contains the declarations of the %_NetAccountDatabase class.
24 #ifndef _FNET_INTERNAL_NET_ACCOUNT_DATABASE_H_
25 #define _FNET_INTERNAL_NET_ACCOUNT_DATABASE_H_
27 #include <FBaseDataType.h>
28 #include <FNetNetTypes.h>
30 namespace Tizen { namespace Base
35 namespace Tizen { namespace Base { namespace Collection
37 template<class Type> class IListT;
39 } } } // Tizen::Base::Collection
41 namespace Tizen { namespace Net {
45 _NET_ACCOUNT_OWNER_OTHER,
46 _NET_ACCOUNT_OWNER_THIS
50 * @class _NetAccountDatabase
51 * @brief This class represents a database for the network account.
54 * This class represents a database for the network account.
56 class _NetAccountDatabase
59 static result InitializeRepository(void);
60 static result AddAccount(const Tizen::Base::String& accountName, const Tizen::Base::String& profileName, _NetAccountOwner owner, NetAccountId& accountId);
61 static result RemoveAccountByAccountId(NetAccountId accountId);
62 static result RemoveAccountByProfileName(const Tizen::Base::String& profileName);
63 static result UpdateAccountName(NetAccountId accountId, const Tizen::Base::String& accountName);
64 static Tizen::Base::Collection::IListT<NetAccountId>* GetAccountIdsN(void);
65 static Tizen::Base::Collection::IList* GetAccountNamesN(void);
66 static Tizen::Base::Collection::IList* GetProfileNamesN(void);
67 static result GetAccountName(NetAccountId accountId, Tizen::Base::String& accountName);
68 static result GetProfileName(NetAccountId accountId, Tizen::Base::String& profileName);
69 static result GetAccountIdByAccountName(const Tizen::Base::String& accountName, NetAccountId& accountId);
70 static result GetAccountIdByProfileName(const Tizen::Base::String& profileName, NetAccountId& accountId);
71 static bool IsReadOnly(NetAccountId accountId);
74 static Tizen::Base::String GetDbPath(void);
77 _NetAccountDatabase(void);
78 virtual ~_NetAccountDatabase(void);
80 _NetAccountDatabase(const _NetAccountDatabase& rhs);
81 _NetAccountDatabase& operator =(const _NetAccountDatabase& rhs);
82 }; // _NetAccountDatabase
85 #endif // _FNET_INTERNAL_NET_ACCOUNT_DATABASE_H_