Tizen 2.0 Release
[framework/osp/media.git] / src / FMedia_PlayerEventArg.cpp
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 #include "FMedia_PlayerEventArg.h"
19
20 namespace Tizen { namespace Media
21 {
22
23 _PlayerEventTypeArg::_PlayerEventTypeArg(void)
24         : __playerEventType(_PLAYER_EVENT_NONE)
25 {
26
27 }
28
29 _PlayerEventTypeArg::~_PlayerEventTypeArg(void)
30 {
31
32
33 }
34 void
35 _PlayerEventTypeArg::SetEventType(_PlayerEventType eType)
36 {
37         __playerEventType = eType;
38 }
39
40 _PlayerEventType
41 _PlayerEventTypeArg::GetEventType(void) const
42 {
43         return __playerEventType;
44 }
45
46 _PlayerEventArg::_PlayerEventArg(void)
47         : __playerData(null)
48         , __result(E_SUCCESS)
49 {
50
51 }
52
53 _PlayerEventArg::~_PlayerEventArg(void)
54 {
55         if (__playerData)
56         {
57                 delete (Tizen::Base::ByteBuffer*) __playerData;
58                 __playerData = null;
59         }
60 }
61
62 void
63 _PlayerEventArg::SetData(Tizen::Base::ByteBuffer* data)
64 {
65         __playerData = data;
66 }
67
68 Tizen::Base::ByteBuffer*
69 _PlayerEventArg::GetData(void) const
70 {
71         return __playerData;
72 }
73
74 result
75 _PlayerEventArg::GetResult(void) const
76 {
77         return __result;
78 }
79
80 void
81 _PlayerEventArg::SetResult(result r)
82 {
83         __result = r;
84 }
85
86
87 _PlayerErrorArg::_PlayerErrorArg(void)
88         : __error(PLAYER_ERROR_NONE)
89 {
90
91 }
92
93 _PlayerErrorArg::~_PlayerErrorArg(void)
94 {
95
96 }
97
98 PlayerErrorReason
99 _PlayerErrorArg::GetError(void) const
100 {
101         return __error;
102 }
103
104 void
105 _PlayerErrorArg::SetError(PlayerErrorReason r)
106 {
107         __error = r;
108 }
109
110 _PlayerStreamingEventArg::_PlayerStreamingEventArg(void)
111         : __percent(0)
112 {
113
114 }
115
116 _PlayerStreamingEventArg::~_PlayerStreamingEventArg(void)
117 {
118
119 }
120
121 int
122 _PlayerStreamingEventArg::GetPercent(void) const
123 {
124         return __percent;
125 }
126
127 void
128 _PlayerStreamingEventArg::SetPercent(int value)
129 {
130         __percent = value;
131 }
132
133
134 };
135 };   // Tizen::Media