2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
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.
17 * @file FScl_AccountAccessorImpl.h
18 * @brief This is the header file for the %_AccountAccessorImpl class.
20 * This header file contains the declarations of the %_AccountAccessorImpl class.
23 #ifndef _FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_
24 #define _FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_
26 #include <account-types.h>
27 #include <FAppTypes.h>
28 #include <FBaseObject.h>
29 #include <FBaseResult.h>
30 #include <FSclTypes.h>
31 #include "FScl_IAccountDbChangeEventListener.h"
33 namespace Tizen { namespace Base {
34 namespace Collection {
39 namespace Tizen { namespace Social
42 class AccountAccessor;
43 class IAccountEventListener;
45 class _AccountAccessorImpl
46 : public Tizen::Base::Object
47 , virtual public _IAccountDbChangeEventListener
50 _AccountAccessorImpl(void);
52 virtual ~_AccountAccessorImpl(void);
54 result Construct(void);
56 result SetEventListener(IAccountEventListener* pListener);
58 Account GetAccount(AccountId accountId) const;
60 Tizen::Base::Collection::IList* GetAccountsByAccountProviderN(const Tizen::App::AppId& accountProviderAppId) const;
62 Tizen::Base::Collection::IList* GetAllAccountsN(void) const;
64 AccountProvider GetAccountProvider(const Tizen::App::AppId& accountProviderAppId) const;
66 Tizen::Base::Collection::IList* GetAccountProvidersByCapabilityN(const Tizen::Base::String& capability) const;
68 Tizen::Base::Collection::IList* GetAllAccountProvidersN(void) const;
70 static _AccountAccessorImpl* GetInstance(AccountAccessor& AccountAccessor);
72 static const _AccountAccessorImpl* GetInstance(const AccountAccessor& AccountAccessor);
74 virtual void OnAccountAdded(AccountId accountId);
76 virtual void OnAccountUpdated(AccountId accountId);
78 virtual void OnAccountRemoved(AccountId accountId);
81 _AccountAccessorImpl& operator =(const _AccountAccessorImpl& rhs);
82 _AccountAccessorImpl(const _AccountAccessorImpl& rhs);
85 IAccountEventListener* __pIAccountEventListener;
87 }; // _AccountAccessorImpl
91 #endif //_FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_