Fix for CompatTC Fail
[framework/osp/social.git] / src / FScl_AccountImpl.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_AccountImpl.h
18  * @brief       This is the header file for the %_AccountImpl class.
19  *
20  * This header file contains the declarations of the %_AccountImpl class.
21  */
22 #ifndef _FSCL_INTERNAL_ACCOUNT_IMPL_H_
23 #define _FSCL_INTERNAL_ACCOUNT_IMPL_H_
24
25 #include <unique_ptr.h>
26 #include <FBaseColAllElementsDeleter.h>
27 #include <FBaseColHashMap.h>
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FSclAccountProvider.h>
31 #include <FSclTypes.h>
32
33 namespace Tizen { namespace Base
34 {
35 namespace Collection
36 {
37 class IMap;
38 }
39 }}
40
41 namespace Tizen { namespace Social
42 {
43
44 class Account;
45
46 class _AccountImpl
47         : public Tizen::Base::Object
48 {
49 public:
50         _AccountImpl(const Tizen::Base::String& userName);
51
52         _AccountImpl(const _AccountImpl& rhs);
53
54         virtual ~_AccountImpl(void);
55
56         virtual bool Equals(const Tizen::Base::Object& rhs) const;
57
58         virtual int GetHashCode(void) const;
59
60         AccountId GetId(void) const;
61
62         AccountProvider GetAccountProvider(void) const;
63
64         Tizen::Base::String GetUserName(void) const;
65
66         Tizen::Base::Collection::IMap* GetExtendedDataN(void) const;
67
68         void SetId(AccountId accountId);
69
70         void SetAccountProvider(const AccountProvider& accountProvider);
71
72         result SetUserName(const Tizen::Base::String& userName);
73
74         result SetExtendedData(const Tizen::Base::String& key, const Tizen::Base::String& value);
75
76         _AccountImpl& operator =(const _AccountImpl& rhs);
77
78         static const _AccountImpl* GetInstance(const Account& account);
79
80         static _AccountImpl* GetInstance(Account& account);
81
82 private:
83         AccountId __id;
84         Tizen::Base::String __userName;
85         std::unique_ptr<Tizen::Base::Collection::HashMap, Tizen::Base::Collection::AllElementsDeleter> __pExtendedData;
86         AccountProvider __accountProvider;
87
88 }; // _AccountImpl
89
90 }} // Tizen::Social
91
92 #endif //_FSCL_INTERNAL_ACCOUNT_IMPL_H_