Merge "Fixed exception handling codes" into tizen_2.1
[framework/osp/social.git] / src / FScl_AccountProviderImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17 /**
18  * @file        FScl_AccountProviderImpl.h
19  * @brief       This is the header file for the %_AccountProviderImpl class.
20  *
21  * This header file contains the declarations of the %_AccountProviderImpl class.
22  */
23 #ifndef _FSCL_INTERNAL_ACCOUNT_PROVIDER_IMPL_H_
24 #define _FSCL_INTERNAL_ACCOUNT_PROVIDER_IMPL_H_
25
26 #include <unique_ptr.h>
27 #include <FAppTypes.h>
28 #include <FBaseColAllElementsDeleter.h>
29 #include <FBaseColArrayList.h>
30 #include <FBaseObject.h>
31 #include <FBaseString.h>
32 #include <FSclTypes.h>
33
34 namespace Tizen { namespace Base
35 {
36 namespace Collection
37 {
38 class IList;
39 }
40 }}
41
42 namespace Tizen { namespace Social
43 {
44
45 class AccountProvider;
46
47 class _AccountProviderImpl
48         : public Tizen::Base::Object
49 {
50 public:
51         _AccountProviderImpl(void);
52
53         _AccountProviderImpl(const _AccountProviderImpl& rhs);
54
55         virtual ~_AccountProviderImpl(void);
56
57         virtual bool Equals(const Tizen::Base::Object& rhs) const;
58
59         virtual int GetHashCode(void) const;
60
61         result AddCapability(const Tizen::Base::String& capability);
62
63         Tizen::App::AppId GetAppId(void) const;
64
65         Tizen::Base::Collection::IList* GetCapabilitiesN(void) const;
66
67         Tizen::Base::String GetDisplayName(void) const;
68
69         Tizen::Base::String GetIconPath(void) const;
70
71         Tizen::Base::String GetSmallIconPath(void) const;
72
73         bool IsMultipleAccountSupported(void) const;
74
75         void SetAppId(const Tizen::App::AppId& appId);
76
77         void SetDisplayName(const Tizen::Base::String& displayName);
78
79         void SetIconPath(const Tizen::Base::String& iconPath);
80
81         void SetSmallIconPath(const Tizen::Base::String& smallIconPath);
82
83         void SetMultipleAccountsSupport(bool isSupported);
84
85         _AccountProviderImpl& operator =(const _AccountProviderImpl& rhs);
86
87         bool operator ==(const _AccountProviderImpl& rhs) const;
88
89         bool operator !=(const _AccountProviderImpl& rhs) const;
90
91         static const _AccountProviderImpl* GetInstance(const AccountProvider& accountProvider);
92
93         static _AccountProviderImpl* GetInstance(AccountProvider& accountProvider);
94
95 private:
96         Tizen::App::AppId __appId;
97         std::unique_ptr<Tizen::Base::Collection::ArrayList, Tizen::Base::Collection::AllElementsDeleter> __pCapabilityList;
98         Tizen::Base::String __displayName;
99         Tizen::Base::String __iconPath;
100         Tizen::Base::String __smallIconPath;
101         bool __isMultipleAccountSupported;
102
103 }; // _AccountProviderImpl
104
105 }} // Tizen::Social
106
107 #endif //_FSCL_INTERNAL_ACCOUNT_PROVIDER_IMPL_H_