wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Content / ContentImage.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 "ContentImage.h"
20 #include <Logger.h>
21
22 namespace DeviceAPI {
23 namespace Content {
24
25 MediacontentImage::MediacontentImage()
26 {
27         LoggerD("enter");
28
29         m_editableAttrList.push_back("geolocation");
30         m_editableAttrList.push_back("orientation");
31 }
32
33 MediacontentImage::~MediacontentImage()
34 {
35         LoggerD("enter");
36 }
37
38 double MediacontentImage::getImageLatitude() const
39 {
40         return m_imageLatitude;
41 }
42
43 double MediacontentImage::getImageLongitude() const
44 {
45         return m_imageLongitude;        
46
47 }
48
49 void MediacontentImage::setImageLatitude(const double  &value, bool isChanged)
50 {
51         m_imageLatitude = value;
52         m_isChangedLatitude = isChanged;
53 }
54 void MediacontentImage::setImageLongitude(const double  &value, bool isChanged)
55 {
56         m_imageLongitude = value;
57         m_isChangedLongitude = isChanged;
58 }
59
60 int MediacontentImage::getImageWidth() const
61 {
62         return m_imageWidth;
63
64 }
65
66 void MediacontentImage::setImageWidth(const int &value)
67 {
68         m_imageWidth = value;
69
70 }
71
72 int MediacontentImage::getImageHeight() const
73 {
74         return m_imageHeight;
75 }
76 void MediacontentImage::setImageHeight(const int &value)
77 {
78         m_imageHeight = value;
79 }
80
81 string MediacontentImage::getImageOrientation() const
82 {
83         return m_imageOrientation;
84 }
85
86 void MediacontentImage::setImageOrientation(const string &value, bool isChanged)
87 {
88         m_imageOrientation = value;
89         m_isChangedOrientation=isChanged;
90 }
91
92 vector<std::string>     MediacontentImage::getEditableAttr() const
93 {
94     return m_editableAttrList;
95 }
96
97 bool MediacontentImage::isChangedOrientaion () const
98 {
99         return m_isChangedOrientation;
100 }
101
102 bool MediacontentImage::isChangedLatitude () const
103 {
104         return m_isChangedLatitude;
105 }
106
107 bool MediacontentImage::isChangedLongitude() const
108 {
109         return m_isChangedLongitude;
110 }
111
112 void MediacontentImage::display()
113 {
114         MediacontentMedia::display();
115         LoggerD("m_imageWidth : " << m_imageWidth);
116         LoggerD("m_imageHeight : " << m_imageHeight);
117         LoggerD("m_imageOrientation : " << m_imageOrientation);
118         LoggerD("m_imageLongitude : " << m_imageLongitude);
119         LoggerD("m_imageLatitude : " << m_imageLatitude);       
120
121 }
122
123
124 }
125 }