Fix for CompatTC Fail
[framework/osp/social.git] / src / FScl_AccountAccessorImpl.h
1 //
2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
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  * @file                FScl_AccountAccessorImpl.h
18  * @brief       This is the header file for the %_AccountAccessorImpl class.
19  *
20  * This header file contains the declarations of the %_AccountAccessorImpl class.
21  */
22
23 #ifndef _FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_
24 #define _FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_
25
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"
32
33 namespace Tizen { namespace Base {
34 namespace Collection {
35 class IList;
36 }
37 }}
38
39 namespace Tizen { namespace Social
40 {
41 class Account;
42 class AccountAccessor;
43 class IAccountEventListener;
44
45 class _AccountAccessorImpl
46         : public Tizen::Base::Object
47         , virtual public _IAccountDbChangeEventListener
48 {
49 public:
50         _AccountAccessorImpl(void);
51
52         virtual ~_AccountAccessorImpl(void);
53
54         result Construct(void);
55
56         result SetEventListener(IAccountEventListener* pListener);
57
58         Account GetAccount(AccountId accountId) const;
59
60         Tizen::Base::Collection::IList* GetAccountsByAccountProviderN(const Tizen::App::AppId& accountProviderAppId) const;
61
62         Tizen::Base::Collection::IList* GetAllAccountsN(void) const;
63
64         AccountProvider GetAccountProvider(const Tizen::App::AppId& accountProviderAppId) const;
65
66         Tizen::Base::Collection::IList* GetAccountProvidersByCapabilityN(const Tizen::Base::String& capability) const;
67
68         Tizen::Base::Collection::IList* GetAllAccountProvidersN(void) const;
69
70         static _AccountAccessorImpl* GetInstance(AccountAccessor& AccountAccessor);
71
72         static const _AccountAccessorImpl* GetInstance(const AccountAccessor& AccountAccessor);
73
74         virtual void OnAccountAdded(AccountId accountId);
75
76         virtual void OnAccountUpdated(AccountId accountId);
77
78         virtual void OnAccountRemoved(AccountId accountId);
79
80 private:
81         _AccountAccessorImpl& operator =(const _AccountAccessorImpl& rhs);
82         _AccountAccessorImpl(const _AccountAccessorImpl& rhs);
83
84 private:
85         IAccountEventListener* __pIAccountEventListener;
86
87 };      // _AccountAccessorImpl
88
89 }}  // Tizen::Social
90
91 #endif //_FSCL_INTERNAL_ACCOUNT_ACCESSOR_IMPL_H_