8f9530b8cb2ad0f2dab281fd7534d28787a30fae
[framework/web/wrt-plugins-tizen.git] / src / Content / ContentFolder.cpp
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 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
19 #include <dpl/log/log.h>
20 #include <Commons/Exception.h>
21 #include "ContentFolder.h"
22
23 namespace DeviceAPI {
24 namespace Content {
25
26
27 MediacontentFolder::MediacontentFolder()
28 {
29
30 }
31
32 MediacontentFolder::~MediacontentFolder()
33 {
34
35 }
36
37
38 string MediacontentFolder::getFolderUUID() const
39 {
40     return m_folderUUID;
41 }
42
43 void MediacontentFolder::setFolderUUID(const string &value)
44 {
45         m_folderUUID = value;
46 }
47
48
49 string MediacontentFolder::getFolderName() const
50 {
51     return m_folderName;
52 }
53
54 void MediacontentFolder::setFolderName(const string &value)
55 {
56         m_folderName = value;
57 }
58
59 string MediacontentFolder::getFolderPath() const
60 {
61         return m_folderPath;
62
63 }
64
65 void MediacontentFolder::setFolderPath(const string &value)
66 {
67         m_folderPath = value;
68
69 }
70
71 string MediacontentFolder::getFolderStorageType()
72 {
73         return m_storageType;   
74 }
75
76 void MediacontentFolder::setFolderStorageType(const string &value)
77 {
78         m_storageType = value;
79
80 }
81 tm MediacontentFolder::getFolderModifiedDate() const
82 {
83         return m_modifiedDate;
84 }
85
86 MediaIdListPtr MediacontentFolder::getMediaIdList() const
87 {
88         return m_mediaIdArrayPtr;
89 }
90
91
92 void MediacontentFolder::setFolderModifiedDate(const tm &value)
93 {
94         m_modifiedDate = value;
95
96 }
97
98 void MediacontentFolder::setMediaIdList(const MediaIdListPtr &value)
99 {
100         m_mediaIdArrayPtr = value;
101
102 }
103
104
105 void MediacontentFolder::insertValue(string attrName, string value)
106 {
107         m_folderValue.insert(pair<string, string>(attrName,value));
108 }
109
110 string MediacontentFolder::findValue(string attrName)
111 {
112
113         string value;
114         
115         map<string, string>::iterator pos;
116
117         pos = m_folderValue.find(attrName);
118
119         if(m_folderValue.end() != pos)
120         {
121                 value = pos->second;
122         }
123         else
124         {
125                 LogDebug("Attribute(" << attrName << ") There is no data.");
126         }
127         return value;
128 }
129
130
131 void MediacontentFolder::display() const
132 {
133     LogDebug("m_folderUUID: " << m_folderUUID);
134     LogDebug("m_folderName: " << m_folderName);
135         LogDebug("m_folderPath: " << m_folderPath);
136         LogDebug("m_storageType: " << m_storageType);
137 }
138
139
140 }
141 }