diff options
author | Sehong Na <sehong.na@samsung.com> | 2014-05-31 13:20:25 +0900 |
---|---|---|
committer | Sehong Na <sehong.na@samsung.com> | 2014-05-31 13:20:25 +0900 |
commit | 59c401dcb6127a3ca74995bd3b3a7864a95fc418 (patch) | |
tree | 1d621db3eb1506f2fa42f1c38e143b90e1c3984f /wearable_src/Content/ContentAudio.h | |
download | wrt-plugins-tizen-59c401dcb6127a3ca74995bd3b3a7864a95fc418.tar.gz wrt-plugins-tizen-59c401dcb6127a3ca74995bd3b3a7864a95fc418.tar.bz2 wrt-plugins-tizen-59c401dcb6127a3ca74995bd3b3a7864a95fc418.zip |
Initialize Tizen 2.3submit/tizen_2.3/20140531.1146262.3a_releasetizen_2.3
Diffstat (limited to 'wearable_src/Content/ContentAudio.h')
-rwxr-xr-x | wearable_src/Content/ContentAudio.h | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/wearable_src/Content/ContentAudio.h b/wearable_src/Content/ContentAudio.h new file mode 100755 index 0000000..87181fa --- /dev/null +++ b/wearable_src/Content/ContentAudio.h @@ -0,0 +1,118 @@ +// +// Tizen Web Device API +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + + +#ifndef _ABSTRACT_LAYER_CONTENT_AUDIO_H_ +#define _ABSTRACT_LAYER_CONTENT_AUDIO_H_ + +#include <ctime> +#include <string> +#include <vector> +#include <dpl/optional.h> +#include <dpl/shared_ptr.h> +#include "ContentMedia.h" +#include "AudioLyrics.h" + +using namespace std; + +namespace DeviceAPI { +namespace Content { + +typedef enum +{ + CONTENT_LYRIC_UNKNOWN = 0, + CONTENT_LYRIC_EXISTENT, + CONTENT_LYRIC_NON_EXISTENT, +}mediacontent_lyric_state; + +class MediacontentAudio : public MediacontentMedia +{ + public: + + MediacontentAudio(); + virtual ~MediacontentAudio(); + + string getAudioAlbum() const; + vector<std::string> getAudioArtist() const; + vector<std::string> getAudioGenre() const; + vector<std::string> getAudioComposer() const; + string getAudioCopyright() const; + int getAudioBitrate() const; + int getAudioTrackNum() const; + int getAudioDuration() const; + int getAudioRating() const; + unsigned long long getAudioSize() const; + + MediacontentLyricsPtr getAudioLyrics() const; + + void setAudioAlbum(const string &value, bool isChanged=false); + void setAudioArtist(const vector<std::string> &value, bool isChanged=false); + void setAudioGenre(const vector<std::string> &value, bool isChanged=false); + void setAudioComposer(const vector<std::string> &value, bool isChanged=false); + + void appendAudioArtist(const string &value); + void appendAudioGenre(const string &value); + void appendAudioComposer(const string &value); + + void setAudioCopyright(const string &value); + void setAudioBitrate(const int &value); + void setAudioTrackNum(const int &value, bool isChanged=false); + void setAudioDuration(const int &value); + void setAudioSize(const unsigned long long &value); + + void setAudioLyrics(MediacontentLyricsPtr value); + void setAudioLyricNonExistent(); + //void setLyricsState(mediacontent_lyric_state value); + + bool isChangedAudioAlbum(); + bool isChangedAudioArtist(); + bool isChangedAudioGenre(); + bool isChangedAudioComposer(); + bool isChangedAudioTrackNumber(); + mediacontent_lyric_state getLyricsState(); + + virtual vector<std::string> getEditableAttr() const; + + protected: + string m_audioAlbum; + vector<std::string> m_audioArtist; + vector<std::string> m_audioGenre; + vector<std::string> m_audioAuthor; + string m_audioCopyright; + int m_audioTrackNum; + int m_audioDuration; + int m_audioBitrate; + unsigned long long m_audioSize; + bool m_isChangedAudioAlbum; + bool m_isChangedAudioArtist; + bool m_isChangedAudioGenre; + bool m_isChangedAudioComposer; + bool m_isChangedAudioTrackNumber; + mediacontent_lyric_state m_lyricsState; + + MediacontentLyricsPtr m_lyrics; + +}; + +typedef DPL::SharedPtr<MediacontentAudio> MediacontentAudioPtr; + + +} +} + +#endif /* _ABSTRACT_LAYER_CONTENT_AUDIO_H_ */ + |