wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Content / ContentVideo.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 #include <Commons/Exception.h>
19 #include "ContentVideo.h"
20 #include <Logger.h>
21
22 namespace DeviceAPI {
23 namespace Content {
24
25
26 MediacontentVideo::MediacontentVideo()
27 {
28         m_editableAttrList.push_back("geolocation");
29
30 }
31
32 MediacontentVideo::~MediacontentVideo()
33 {
34 }
35
36 int MediacontentVideo::getVideoDuration() const
37 {
38         return m_videoDuration;
39
40 }
41
42 int MediacontentVideo::getVideoWidth() const
43 {
44         return m_videoWidth;
45
46 }
47
48 int MediacontentVideo::getVideoHeight() const
49 {
50         return m_videoHeight;
51 }
52
53 double MediacontentVideo::getVideoLatitude() const
54 {
55         return m_videoLatitude;
56 }
57
58 double MediacontentVideo::getVideoLongitude() const
59 {
60         return m_videoLongitude;        
61
62 }
63
64 string MediacontentVideo::getVideoAlbum() const
65 {
66     return m_videoAlbum;
67 }
68
69 vector<std::string> MediacontentVideo::getVideoArtist() const
70 {
71     return m_videoArtist;
72 }
73
74
75 void MediacontentVideo::setVideoDuration(const int &value)
76 {
77         m_videoDuration = value;
78 }
79
80 void MediacontentVideo::setVideoWidth(const int &value)
81 {
82         m_videoWidth = value;
83
84 }
85
86 void MediacontentVideo::setVideoHeight(const int &value)
87 {
88         m_videoHeight = value;
89
90 }
91
92 void MediacontentVideo::setVideoLatitude(const double  &value, bool isChanged)
93 {
94         m_videoLatitude = value;
95         m_isChangedLatitude =isChanged;
96 }
97
98 void MediacontentVideo::setVideoLongitude(const double  &value, bool isChanged)
99 {
100         m_videoLongitude = value;
101         m_isChangedLongitude=isChanged;
102 }
103
104 void MediacontentVideo::setVideoAlbum(const string &value, bool isChanged)
105 {
106         m_videoAlbum = value;
107         m_isChangedAlbum=isChanged;
108 }
109
110 void MediacontentVideo::setVideoArtist(const vector<std::string> &value, bool isChanged)
111 {
112         m_videoArtist = value;
113         m_isChangedArtists=isChanged;
114 }
115
116 void MediacontentVideo::appendVideoArtist(const string value)
117 {
118         m_videoArtist.push_back(value);
119 }
120
121 bool MediacontentVideo::isChangedArtists()
122 {
123         return m_isChangedArtists;
124 }
125
126 bool MediacontentVideo::isChangedAlbum()
127 {
128         return m_isChangedAlbum;
129 }
130
131 bool MediacontentVideo::isChangedLatitude()
132 {
133         return m_isChangedLatitude;
134 }
135
136 bool MediacontentVideo::isChangedLongitude()
137 {
138         return m_isChangedLongitude;
139 }
140
141 vector<std::string> MediacontentVideo::getEditableAttr() const
142 {
143     return m_editableAttrList;
144 }
145
146 void MediacontentVideo::display() const
147 {
148
149         LoggerD("m_videoLongitude: " << m_videoLongitude;);
150     LoggerD("m_videoLatitude:    " << m_videoLatitude); 
151     LoggerD("m_videoAlbum: " << m_videoAlbum;);
152         //LoggerD("m_videoArtist:        " << m_videoArtist);
153         //LoggerD("m_videoPlayedTime: " << m_videoPlayedTime);
154         LoggerD("m_videoDuration: " << m_videoDuration);
155         LoggerD("m_videoWidth: " << m_videoWidth);
156         LoggerD("m_videoHeight: " << m_videoHeight);    
157         MediacontentMedia::display();
158 }
159
160 }
161 }