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