|
1 /* |
|
2 * Copyright (c) 2007,2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: A rendering operation modeled as a class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // -------------------------------------------------------------------------- |
|
20 // TUpnpRenderingOperation::TUpnpRenderingOperation |
|
21 // -------------------------------------------------------------------------- |
|
22 // |
|
23 inline TUpnpRenderingOperation::TUpnpRenderingOperation( |
|
24 Upnp::TCommand aCmd, TInt aParam, const TAny* aData ) |
|
25 { |
|
26 iCmd=aCmd; |
|
27 iParam=aParam; |
|
28 iData=aData; |
|
29 iUserOriented=ETrue; |
|
30 } |
|
31 |
|
32 // -------------------------------------------------------------------------- |
|
33 // TUpnpRenderingOperation::TUpnpRenderingOperation |
|
34 // -------------------------------------------------------------------------- |
|
35 // |
|
36 inline TUpnpRenderingOperation::TUpnpRenderingOperation( |
|
37 Upnp::TCommand aCmd, const TAny* aData ) |
|
38 { |
|
39 iCmd=aCmd; |
|
40 iParam=0; |
|
41 iData=aData; |
|
42 iUserOriented=ETrue; |
|
43 } |
|
44 |
|
45 // -------------------------------------------------------------------------- |
|
46 // TUpnpRenderingOperation::operator= |
|
47 // -------------------------------------------------------------------------- |
|
48 // |
|
49 inline TUpnpRenderingOperation TUpnpRenderingOperation::operator=( |
|
50 Upnp::TCommand aCmd ) |
|
51 { |
|
52 iCmd=aCmd; |
|
53 iParam=0; |
|
54 iData=0; |
|
55 iUserOriented=ETrue; |
|
56 return *this; |
|
57 } |
|
58 |
|
59 // -------------------------------------------------------------------------- |
|
60 // TUpnpRenderingOperation::operator= |
|
61 // -------------------------------------------------------------------------- |
|
62 // |
|
63 inline TUpnpRenderingOperation TUpnpRenderingOperation::operator=( |
|
64 const TUpnpRenderingOperation& aOther ) |
|
65 { |
|
66 iCmd=aOther.iCmd; |
|
67 iParam=aOther.iParam; |
|
68 iData=aOther.iData; |
|
69 iUserOriented=aOther.iUserOriented; |
|
70 return *this; |
|
71 } |
|
72 |
|
73 // -------------------------------------------------------------------------- |
|
74 // TUpnpRenderingOperation::operator== |
|
75 // -------------------------------------------------------------------------- |
|
76 // |
|
77 inline TBool TUpnpRenderingOperation::operator==( |
|
78 Upnp::TCommand aCmd ) const |
|
79 { |
|
80 return iCmd==aCmd; |
|
81 } |
|
82 |
|
83 // -------------------------------------------------------------------------- |
|
84 // TUpnpRenderingOperation::operator!= |
|
85 // -------------------------------------------------------------------------- |
|
86 // |
|
87 inline TBool TUpnpRenderingOperation::operator!=( |
|
88 Upnp::TCommand aCmd ) const |
|
89 { |
|
90 return !operator==(aCmd); |
|
91 } |
|
92 |
|
93 // -------------------------------------------------------------------------- |
|
94 // TUpnpRenderingOperation::operator== |
|
95 // -------------------------------------------------------------------------- |
|
96 // |
|
97 inline TBool TUpnpRenderingOperation::operator==( |
|
98 const TUpnpRenderingOperation& aOther ) const |
|
99 { |
|
100 return iCmd==aOther.iCmd && iParam==aOther.iParam && |
|
101 iData==aOther.iData && iUserOriented==aOther.iUserOriented; |
|
102 } |
|
103 |
|
104 // -------------------------------------------------------------------------- |
|
105 // TUpnpRenderingOperation::operator!= |
|
106 // -------------------------------------------------------------------------- |
|
107 // |
|
108 inline TBool TUpnpRenderingOperation::operator!=( |
|
109 const TUpnpRenderingOperation& aOther ) const |
|
110 { |
|
111 return !operator==(aOther); |
|
112 } |
|
113 |
|
114 // -------------------------------------------------------------------------- |
|
115 // TUpnpRenderingOperation::IsValid |
|
116 // -------------------------------------------------------------------------- |
|
117 // |
|
118 inline TBool TUpnpRenderingOperation::IsValid() const |
|
119 { |
|
120 return iCmd != Upnp::ENone; |
|
121 } |
|
122 |
|
123 // -------------------------------------------------------------------------- |
|
124 // TUpnpRenderingOperation::IsUserOriented |
|
125 // -------------------------------------------------------------------------- |
|
126 // |
|
127 inline TBool TUpnpRenderingOperation::IsUserOriented() const |
|
128 { |
|
129 return iUserOriented; |
|
130 } |
|
131 |
|
132 // -------------------------------------------------------------------------- |
|
133 // TUpnpRenderingOperation::Command |
|
134 // -------------------------------------------------------------------------- |
|
135 // |
|
136 inline const Upnp::TCommand& |
|
137 TUpnpRenderingOperation::Command() const |
|
138 { |
|
139 return iCmd; |
|
140 } |
|
141 |
|
142 // -------------------------------------------------------------------------- |
|
143 // TUpnpRenderingOperation::Param |
|
144 // -------------------------------------------------------------------------- |
|
145 // |
|
146 inline TInt& TUpnpRenderingOperation::Param() |
|
147 { |
|
148 return iParam; |
|
149 } |
|
150 |
|
151 // -------------------------------------------------------------------------- |
|
152 // TUpnpRenderingOperation::Param |
|
153 // -------------------------------------------------------------------------- |
|
154 // |
|
155 inline const TInt& TUpnpRenderingOperation::Param() const |
|
156 { |
|
157 return iParam; |
|
158 } |
|
159 |
|
160 // -------------------------------------------------------------------------- |
|
161 // TUpnpRenderingOperation::Data |
|
162 // -------------------------------------------------------------------------- |
|
163 // |
|
164 inline const TAny* TUpnpRenderingOperation::Data() const |
|
165 { |
|
166 return iData; |
|
167 } |
|
168 |
|
169 // -------------------------------------------------------------------------- |
|
170 // TUpnpRenderingOperation::SetUserOriented |
|
171 // -------------------------------------------------------------------------- |
|
172 // |
|
173 inline void TUpnpRenderingOperation::SetUserOriented( TBool aUserOriented ) |
|
174 { |
|
175 iUserOriented = aUserOriented; |
|
176 } |
|
177 |
|
178 // End of File |