Tizen 2.0 Release
[framework/osp/media.git] / src / FMedia_TonePlayerEventArg.h
1 //
2 // Open Service Platform
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 //
19 // @file                        FMedia_TonePlayerEventArg.h
20 // @brief                       This header file contains the declaration related to TonePlayer class.
21 //
22
23 #ifndef _FMEDIA_INTERNAL_TONEPLAYER_EVENTARG_H_
24 #define _FMEDIA_INTERNAL_TONEPLAYER_EVENTARG_H_
25
26 #include <FBaseObject.h>
27 #include <FBaseByteBuffer.h>
28 #include <FBaseRtIEventArg.h>
29 #include <FMediaToneTypes.h>
30
31 namespace Tizen {namespace Media
32 {
33
34 class _TonePlayerImpl;
35
36 enum _TonePlayerEventType
37 {
38         _TONEPLAYER_EVENT_NONE,
39         _TONEPLAYER_EVENT_END_OF_PLAY_REACHED,
40         _TONEPLAYER_EVENT_INTERRUPTED,
41         _TONEPLAYER_EVENT_RELEASED,
42         _TONEPLAYER_EVENT_AUDIO_FOCUS_CHAGNED,
43         _TONEPLAYER_EVENT_ERROR
44 };
45
46 class _TonePlayerEventTypeArg
47         : public Tizen::Base::Runtime::IEventArg
48         , public Tizen::Base::Object
49 {
50 public:
51         _TonePlayerEventTypeArg(void);
52         virtual ~_TonePlayerEventTypeArg(void);
53         _TonePlayerEventType GetEventType(void) const;
54         void SetEventType(_TonePlayerEventType eType);
55
56 private:
57         _TonePlayerEventTypeArg(const _TonePlayerEventTypeArg& rhs);
58         _TonePlayerEventTypeArg& operator =(const _TonePlayerEventTypeArg& rhs);
59
60         _TonePlayerEventType __eventType;
61
62 };
63
64 class _TonePlayerEventArg
65         : public _TonePlayerEventTypeArg
66 {
67 public:
68         _TonePlayerEventArg(void);
69         ~_TonePlayerEventArg(void);
70         Tizen::Base::ByteBuffer* GetData(void) const;
71         void SetData(Tizen::Base::ByteBuffer* data);
72         bool GetBoolFlag(void) const;
73         void SetBoolFlag(bool boolFlag);
74         result GetResult(void) const;
75         void SetResult(result r);
76
77 private:
78         bool __boolFlag;
79         result __result;
80
81 };
82
83 class _TonePlayerErrorArg
84         : public _TonePlayerEventTypeArg
85 {
86 public:
87         _TonePlayerErrorArg(void);
88         ~_TonePlayerErrorArg(void);
89         result GetError(void) const;
90         void SetError(result r);
91
92 private:
93         result __result;
94
95 };
96
97 }}//Tizen::Media
98
99 #endif