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