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_SYSTEM_INTERNET,
46 _NET_ACCOUNT_OWNER_SYSTEM_MMS,
47 _NET_ACCOUNT_OWNER_SYSTEM,
48 _NET_ACCOUNT_OWNER_OTHER,
49 _NET_ACCOUNT_OWNER_THIS
53 * @class _NetAccountDatabase
54 * @brief This class represents a database for the network account.
57 * This class represents a database for the network account.
59 class _NetAccountDatabase
62 static result InitializeRepository(void);
63 static result AddAccount(const Tizen::Base::String& accountName, const Tizen::Base::String& profileName, _NetAccountOwner owner, NetAccountId& accountId);
64 static result RemoveAccountByAccountId(NetAccountId accountId);
65 static result RemoveAccountByProfileName(const Tizen::Base::String& profileName);
66 static result UpdateAccountName(NetAccountId accountId, const Tizen::Base::String& accountName);
67 static Tizen::Base::Collection::IListT<NetAccountId>* GetAccountIdsN(void);
68 static Tizen::Base::Collection::IList* GetAccountNamesN(void);
69 static Tizen::Base::Collection::IList* GetProfileNamesN(void);
70 static Tizen::Base::Collection::IList* GetAppProfileNamesN(void);
71 static result GetAccountName(NetAccountId accountId, Tizen::Base::String& accountName);
72 static result GetProfileName(NetAccountId accountId, Tizen::Base::String& profileName);
73 static result GetAccountIdByAccountName(const Tizen::Base::String& accountName, NetAccountId& accountId);
74 static result GetAccountIdByProfileName(const Tizen::Base::String& profileName, NetAccountId& accountId);
75 static bool IsReadOnly(NetAccountId accountId);
78 static Tizen::Base::String GetDbPath(void);
81 _NetAccountDatabase(void);
82 virtual ~_NetAccountDatabase(void);
84 _NetAccountDatabase(const _NetAccountDatabase& rhs);
85 _NetAccountDatabase& operator =(const _NetAccountDatabase& rhs);
86 }; // _NetAccountDatabase
89 #endif // _FNET_INTERNAL_NET_ACCOUNT_DATABASE_H_