3fd54ecdd06f34068b81ec11fcef4ad61dfc28e9
[framework/web/wrt-plugins-tizen.git] / src / Content / ContentFolder.h
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 #ifndef _ABSTRACT_LAYER_CONTENT_FOLDER_H_
20 #define _ABSTRACT_LAYER_CONTENT_FOLDER_H_
21
22 #include <map>
23 #include <ctime>
24 #include <string>
25 #include <vector>
26 #include <dpl/optional.h>
27 #include <dpl/shared_ptr.h>
28
29 using namespace std;
30
31 namespace DeviceAPI {
32 namespace Content {
33
34
35 typedef vector<std::string> MediaIdList;
36 typedef DPL::SharedPtr<MediaIdList> MediaIdListPtr;
37
38 class MediacontentFolder
39 {
40         public:
41
42         MediacontentFolder();
43         virtual ~MediacontentFolder();
44
45
46         string  getFolderUUID() const;
47         string  getFolderPath() const;  
48         string  getFolderName() const;
49         string  getFolderStorageType();
50         tm      getFolderModifiedDate() const;
51         MediaIdListPtr  getMediaIdList() const; 
52
53         void setFolderUUID(const string &value);
54         void setFolderPath(const string &value);        
55         void setFolderName(const string &value);
56         void setFolderStorageType(const string &value);         
57         void setFolderModifiedDate(const tm &value);
58         void setMediaIdList(const MediaIdListPtr &value);
59
60         void insertValue(string attr, string value);
61         string findValue(string attr);
62
63         void display() const;
64
65         protected:
66
67         string  m_folderUUID;
68         string  m_folderPath;   
69         string  m_folderName;
70         string  m_storageType;          
71         tm      m_modifiedDate;
72         MediaIdListPtr m_mediaIdArrayPtr;
73
74         map<string,string> m_folderValue;
75
76 };
77
78 typedef DPL::SharedPtr<MediacontentFolder> MediacontentFolderPtr;
79 typedef std::vector<MediacontentFolderPtr> MediacontentFolderList;
80 typedef DPL::SharedPtr<MediacontentFolderList> MediacontentFolderListPtr;
81
82
83 }
84 }
85
86 #endif /* _ABSTRACT_LAYER_CONTENT_FOLDER_H_ */
87