d6063401d63a84af3204403609ac2955f17020a1
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Mediacontent / MediacontentMedia.h
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
18 #ifndef _ABSTRACT_LAYER_MEDIACONTENT_MEDIA_H_
19 #define _ABSTRACT_LAYER_MEDIACONTENT_MEDIA_H_
20
21 #include <ctime>
22 #include <string>
23 #include <vector>
24 #include <dpl/optional.h>
25 #include <dpl/shared_ptr.h>
26
27 using namespace std;
28
29 namespace TizenApis {
30 namespace Api {
31 namespace Mediacontent {
32
33 typedef enum 
34 {
35         MEDIA_TYPE_IMAGE        = 1,
36         MEDIA_TYPE_VIDEO        = 2,
37         MEDIA_TYPE_AUDIO        = 3,
38         MEDIA_TYPE_UNKOWN       = 4,
39 }media_type;
40
41
42 typedef vector<std::string> EditableAttributeList;
43 typedef DPL::SharedPtr<EditableAttributeList> EditableAttributeListPtr;
44
45 class MediacontentMedia
46 {
47         public:
48
49         MediacontentMedia();
50         virtual ~MediacontentMedia();
51
52         string getMediaUUID() const;
53         string getMediaType() const;
54         string getMimeType();
55         string getDisplayName() const;
56         string getFilePath() const;
57         string getThumbnailPath() const;
58         tm getCreatedDate() const;
59         tm getReleasedDate() const;
60         tm getModifiedDate() const;
61         string getDescription() const;  
62         int getFavorite() const;
63
64         bool getIsChangedFavorite() const;
65
66         void setMediaUUID(const string &value);
67         void setMediaType(const string &value);
68         void setMimeType(const string &value);
69         void setDisplayName(const string &value);       
70         void setFilePath(const string &value);  
71         void setThumbnailPath(const string &value);     
72         void setCreatedDate(const tm &value);
73         void setReleasedDate(const tm &value);
74         void setModifiedDate(const tm &value);  
75         void setFavorite( int value);
76         void setDescription(const string &value);
77
78         void display() const;
79         virtual EditableAttributeListPtr        getEditableAttr() const;
80
81         private:
82         string m_mediaUUID;
83         string m_mediaType;
84         string m_mimeType;
85         string m_displayName;
86         string m_filePath;
87         string m_thumbnailPath;
88         string m_description;
89         tm m_createdDate;
90         tm m_releasedDate;
91         tm m_modifiedDate;
92         int m_favorite;
93         bool m_isChangedFavorite;
94         bool m_isGetMimetype;
95         
96         protected:
97         EditableAttributeListPtr m_editableAttrPtr;
98
99 };
100
101
102 typedef DPL::SharedPtr<MediacontentMedia> MediacontentMediaPtr;
103 typedef std::vector<MediacontentMediaPtr> MediacontentMediaList;
104 typedef DPL::SharedPtr<MediacontentMediaList> MediacontentMediaListPtr;
105
106
107 }
108 }
109 }
110
111 #endif /* _ABSTRACT_LAYER_MEDIACONTENT_MEDIA_H_ */
112