1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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_ */
|