2 // Open Service Platform
3 // Copyright (c) 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 FScl_AccountAccessorImpl.h
19 * @brief This is the header file for the %_AccountAccessorImpl class.
21 * This header file contains the declarations of the %_AccountAccessorImpl class.
24 #ifndef _FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_
25 #define _FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_
27 #include <account-types.h>
28 #include <FAppTypes.h>
29 #include <FBaseObject.h>
30 #include <FBaseResult.h>
31 #include <FSclTypes.h>
32 #include "FScl_IAccountDbChangeEventListener.h"
34 namespace Tizen { namespace Base {
35 namespace Collection {
40 namespace Tizen { namespace Social
43 class AccountAccessor;
44 class IAccountEventListener;
46 class _AccountAccessorImpl
47 : public Tizen::Base::Object
48 , virtual public _IAccountDbChangeEventListener
51 _AccountAccessorImpl(void);
53 virtual ~_AccountAccessorImpl(void);
55 result Construct(void);
57 result SetEventListener(IAccountEventListener* pListener);
59 Account GetAccount(AccountId accountId) const;
61 Tizen::Base::Collection::IList* GetAccountsByAccountProviderN(const Tizen::App::AppId& accountProviderAppId) const;
63 Tizen::Base::Collection::IList* GetAllAccountsN(void) const;
65 AccountProvider GetAccountProvider(const Tizen::App::AppId& accountProviderAppId) const;
67 Tizen::Base::Collection::IList* GetAccountProvidersByCapabilityN(const Tizen::Base::String& capability) const;
69 Tizen::Base::Collection::IList* GetAllAccountProvidersN(void) const;
71 static _AccountAccessorImpl* GetInstance(AccountAccessor& AccountAccessor);
73 static const _AccountAccessorImpl* GetInstance(const AccountAccessor& AccountAccessor);
75 virtual void OnAccountAdded(AccountId accountId);
77 virtual void OnAccountUpdated(AccountId accountId);
79 virtual void OnAccountRemoved(AccountId accountId);
82 _AccountAccessorImpl& operator =(const _AccountAccessorImpl& rhs);
83 _AccountAccessorImpl(const _AccountAccessorImpl& rhs);
86 IAccountEventListener* __pIAccountEventListener;
88 }; // _AccountAccessorImpl
92 #endif //_FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_