5a6da79ac7a60eb2118c8d7c11dc128095286460
[platform/framework/native/shell.git] / src / FShellLiveboxProviderInfo.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 /**
19  * @file        FShellLiveboxInfo.cpp
20  * @brief       This is the implementation for the LiveboxInfo class.
21  */
22
23 #include <unique_ptr.h>
24
25 #include <livebox-service/livebox-service.h>
26
27 #include <FBase.h>
28 #include <FBaseSysLog.h>
29 #include <FBase_StringConverter.h>
30 #include <FShellLiveboxProviderInfo.h>
31 #include <FShellLiveboxSizeInfo.h>
32
33 #include "FShell_LiveboxProviderInfoImpl.h"
34
35
36 using namespace Tizen::Base;
37 using namespace Tizen::Base::Collection;
38 using namespace Tizen::Graphics;
39
40 namespace Tizen { namespace Shell
41 {
42
43
44 LiveboxProviderInfo::LiveboxProviderInfo(const Tizen::App::AppId& appId, const Tizen::Base::String& name)
45 {
46         __pLiveboxProviderInfoImpl = new (std::nothrow) _LiveboxProviderInfoImpl(appId, name);
47 }
48
49 LiveboxProviderInfo::LiveboxProviderInfo(const LiveboxProviderInfo& rhs)
50 {
51         SysAssert(rhs.__pLiveboxProviderInfoImpl);
52         __pLiveboxProviderInfoImpl = new (std::nothrow) _LiveboxProviderInfoImpl(rhs.__pLiveboxProviderInfoImpl->__appId, rhs.__pLiveboxProviderInfoImpl->__name);
53 }
54
55 //LiveboxProviderInfo&
56 //LiveboxProviderInfo::operator =(const LiveboxProviderInfo& rhs)
57 //{
58 //      __pLiveboxProviderInfoImpl->__appId = rhs.__pLiveboxProviderInfoImpl->__appId;
59 //      __pLiveboxProviderInfoImpl->__name = rhs.__pLiveboxProviderInfoImpl->__name;
60 //      __pLiveboxProviderInfoImpl->__providerId = rhs.__pLiveboxProviderInfoImpl->__providerId;
61 //
62 //      return *this;
63 //}
64
65 LiveboxProviderInfo::~LiveboxProviderInfo()
66 {
67         delete __pLiveboxProviderInfoImpl;
68 }
69
70 Tizen::App::AppId
71 LiveboxProviderInfo::GetAppId() const
72 {
73         SysAssert(__pLiveboxProviderInfoImpl);
74         return __pLiveboxProviderInfoImpl->GetAppId();
75 }
76
77 Tizen::Base::String
78 LiveboxProviderInfo::GetName() const
79 {
80         SysAssert(__pLiveboxProviderInfoImpl);
81         return __pLiveboxProviderInfoImpl->GetName();
82 }
83
84 Tizen::Base::String
85 LiveboxProviderInfo::GetDisplayName() const
86 {
87         SysAssert(__pLiveboxProviderInfoImpl);
88         return __pLiveboxProviderInfoImpl->GetDisplayName();
89 }
90
91 Tizen::Base::String
92 LiveboxProviderInfo::GetIconPath() const
93 {
94         SysAssert(__pLiveboxProviderInfoImpl);
95         return __pLiveboxProviderInfoImpl->GetIconPath();
96 }
97
98 Tizen::Base::String
99 LiveboxProviderInfo::GetConfigurationAppControlAppId() const
100 {
101         return __pLiveboxProviderInfoImpl->GetConfigurationAppControlAppId();
102 }
103
104 Tizen::Base::Collection::IList*
105 LiveboxProviderInfo::GetSizeInfoListN() const
106 {
107         SysAssert(__pLiveboxProviderInfoImpl);
108         return __pLiveboxProviderInfoImpl->GetSizeInfoListN();
109 }
110
111 }} // Tizen::Shell