2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
18 * @file AccAccountPresentationModel.h
19 * @brief This is the header file for AccountPresentationModel class.
22 #ifndef _ACC_ACCOUNT_PRESENTATION_MODEL_H_
23 #define _ACC_ACCOUNT_PRESENTATION_MODEL_H_
27 #include <FGraphics.h>
30 #include "AccIAccountPresentationModelListener.h"
32 class AccountPresentationModel
33 : Tizen::Social::IAccountEventListener
36 AccountPresentationModel();
37 virtual ~AccountPresentationModel();
38 result AddAccountChangedEventListener(IAccountPresentationModelListener& listener);
39 result RemoveAccountChangedEventListener(IAccountPresentationModelListener& listener);
40 int GetAccountCount(void) const;
41 int GetAccountProviderCount(void) const;
42 Tizen::Base::String GetAccountInfo(AccountInfoType type, int index) const;
43 Tizen::Base::String GetAccountProviderName(int index) const;
44 Tizen::Graphics::Bitmap* GetAccountIconN(int index) const;
45 Tizen::Graphics::Bitmap* GetAccountProviderIconN(int index) const;
46 Tizen::App::AppId GetAccountAppId(int index) const;
47 Tizen::App::AppId GetAccountProviderAppId(int index) const;
48 Tizen::Social::AccountId GetAccountId(int index) const;
51 void SetRunningAccountProviderAppId(const Tizen::App::AppId& appId);
52 Tizen::App::AppId GetRunningAccountProviderAppId(void) const;
54 virtual void OnAccountAdded(Tizen::Social::AccountId accountId);
55 virtual void OnAccountRemoved(Tizen::Social::AccountId accountId);
56 virtual void OnAccountUpdated(Tizen::Social::AccountId accountId);
58 static AccountPresentationModel* GetInstance(void);
60 result Construct(void);
61 void FireAccountChangedEvent(void);
62 Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& path) const;
63 // Tizen::Base::String ParseCapability(const Tizen::Base::Collection::IList& capabilityList);
65 static void CreateInstance(void);
66 static void DestroyInstance(void);
68 static AccountPresentationModel* __pInstance;
69 Tizen::Base::Collection::ArrayList* __pAccountList;
70 Tizen::Base::Collection::ArrayList* __pAccountProviderList;
71 Tizen::Base::Collection::LinkedList __accountListeners;
72 Tizen::App::AppId __runningAccountProviderAppId;
75 #endif /* _ACC_ACCOUNT_PRESENTATION_MODEL_H_ */