2 // Open Service Platform
\r
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
\r
5 // Licensed under the Apache License, Version 2.0 (the License);
\r
6 // you may not use this file except in compliance with the License.
\r
7 // You may obtain a copy of the License at
\r
9 // http://www.apache.org/licenses/LICENSE-2.0
\r
11 // Unless required by applicable law or agreed to in writing, software
\r
12 // distributed under the License is distributed on an "AS IS" BASIS,
\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 // See the License for the specific language governing permissions and
\r
15 // limitations under the License.
\r
18 * @if VISPARTNER-OPERATOR
\r
20 * @file FMsg_CbsMessageImpl.h
\r
21 * @brief This is the header file for the _CbsMessageImpl class.
\r
23 * @visibility partner-operator
\r
25 * This header file contains the declarations of the _CbsMessageImpl class.
\r
30 #ifndef _FMSG_INTERNAL_CBS_MESSAGE_IMPL_H_
\r
31 #define _FMSG_INTERNAL_CBS_MESSAGE_IMPL_H_
\r
33 namespace Tizen { namespace Base
\r
40 #include <FBaseDateTime.h>
\r
42 namespace Tizen { namespace Messaging
\r
48 * @if VISPARTNER-OPERATOR
\r
50 * @class _CbsMessageImpl
\r
52 * @brief This class provides methods for handling a CBS message.
\r
56 * @final This class is not intended for extension.
\r
58 * @visibility partner-operator
\r
60 * The %_CbsMessageImpl class provides methods for handling a CBS message. It allows you to get the body text,
\r
61 * received time, and sender address of a CBS message.
\r
66 class _CbsMessageImpl
\r
67 : public Tizen::Base::Object
\r
71 * @if VISPARTNER-OPERATOR
\r
73 * This destructor overrides Tizen::Base::Object::~Object().
\r
77 * @visibility partner-operator
\r
81 virtual ~_CbsMessageImpl(void);
\r
84 * @if VISPARTNER-OPERATOR
\r
86 * Compares the specified instance of %_CbsMessageImpl with the calling instance.
\r
90 * @visibility partner-operator
\r
92 * @return @c true, if the values match @n
\r
93 * @c false, otherwise
\r
94 * @param[in] obj The other Object to be compared
\r
95 * @see Object::Equals()
\r
99 virtual bool Equals(const Tizen::Base::Object& obj) const;
\r
102 * @if VISPARTNER-OPERATOR
\r
104 * Gets the copied instance of the class.
\r
108 * @visibility partner-operator
\r
110 * @return An instance of %_CbsMessageImpl
\r
111 * @exception E_SUCCESS The method is successful.
\r
112 * @exception E_OUT_OF_MEMORY The memory is insufficient.
\r
114 * @remarks In case of error, this method returns @c null. @n
\r
115 * The specific error code can be accessed using the GetLastResult() method.
\r
119 CbsMessage* CloneN(void) const;
\r
123 * @if VISPARTNER-OPERATOR
\r
125 * Gets the hash value of the current instance.
\r
129 * @visibility partner-operator
\r
131 * @return The current instance's hash value
\r
135 virtual int GetHashCode(void) const;
\r
138 * @if VISPARTNER-OPERATOR
\r
140 * Checks whether this message is an ETWS notification.
\r
144 * @visibility partner-operator
\r
146 * @return @c true if this message is an ETWS notification, @n
\r
148 * @remarks If the return value is @c true, the message is ETWS secondary notification.
\r
152 bool IsEtwsNotification(void) const;
\r
155 * @if VISPARTNER-OPERATOR
\r
157 * Gets the serial number of the CBS message.
\r
161 * @visibility partner-operator
\r
163 * @return The serial number of the CBS message
\r
164 * @exception E_SUCCESS The method is successful.
\r
165 * @exception E_OUT_OF_MEMORY The memory is insufficient.
\r
166 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
\r
167 * In case of an error, this method returns null.
\r
171 Tizen::Base::ByteBuffer* GetSerialNumberN(void) const;
\r
174 * @if VISPARTNER-OPERATOR
\r
176 * Gets the message ID of the CBS message.
\r
180 * @visibility partner-operator
\r
182 * @return The the message ID of the CBS message
\r
186 int GetMessageId(void) const;
\r
189 * @if VISPARTNER-OPERATOR
\r
191 * Gets the body of the message.
\r
195 * @visibility partner-operator
\r
197 * @return The body of the message
\r
201 Tizen::Base::String GetText(void) const;
\r
204 * @if VISPARTNER-OPERATOR
\r
206 * Gets the date and time (UTC time) of the message when it is received.
\r
210 * @visibility partner-operator
\r
212 * @return The date and time (UTC time) when the message is received
\r
216 Tizen::Base::DateTime GetReceivedTime(void) const;
\r
219 * @if VISPARTNER-OPERATOR
\r
221 * Gets the Data Coding Scheme of the CBS message.
\r
225 * @visibility partner-operator
\r
227 * @return The Data Coding Scheme of the CBS message
\r
228 * @exception E_SUCCESS The method is successful.
\r
229 * @exception E_OUT_OF_MEMORY The memory is insufficient.
\r
230 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
\r
231 * In case of an error, this method returns null. @n
\r
232 * The alphabet/coding and the language applied to CBS messages are defined in 3GPP TS 23.038
\r
236 byte GetDataCodingScheme(void) const;
\r
240 * @if VISPARTNER-OPERATOR
\r
242 * Gets the language type of a message.
\r
247 * @visibility partner-operator
\r
249 * @return The language type of a message
\r
253 Tizen::Base::String GetLanguageType(void) const;
\r
257 * Gets the instance of CbsChannel
\r
261 static CbsMessage* GetCbsMessageN();
\r
264 * Gets the Impl instance.
\r
267 * @return The pointer to _CbsMessageImpl
\r
268 * @param[in] CbsMessage An instance of CbsMessage
\r
270 static _CbsMessageImpl* GetInstance(CbsMessage& cbsMessage);
\r
274 * This default constructor is intentionally declared as private so that only the platform can create an instance.
\r
278 _CbsMessageImpl(void);
\r
281 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
\r
285 * @param[in] rhs An instance of _CbsMessageImpl
\r
287 _CbsMessageImpl(const _CbsMessageImpl& rhs);
\r
290 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. @n
\r
291 * - Use CloneN() to get an exact copy of the instance.
\r
292 * - Use Equals() to compare the contents of one instance with the other.
\r
296 * @return A reference to this instance
\r
297 * @param[in] rhs An instance of _CbsMessageImpl
\r
299 _CbsMessageImpl& operator =(const _CbsMessageImpl& rhs);
\r
302 * Initializes this instance of %_CbsChannelImpl with the specified parameter.
\r
306 * @param[in] dateTime The date and time (UTC time) when the message is received
\r
307 * @param[in] cbsSerialNumber The cbsSerialNumber of the CBS message
\r
308 * @param[in] text The cbs message body text
\r
309 * @param[in] cbsMessageId The cbsMessageId of the CBS message
\r
310 * @param[in] isEtwsnotification The Etws notification of the CBS message
\r
311 * @exception E_SUCCESS The method is successful.
\r
312 * @exception E_OUT_OF_MEMORY The memory is insufficient.
\r
313 * @exception E_SYSTEM A system error has occurred.
\r
315 result SetCbsMessageImpl(const Tizen::Base::DateTime& dateTime, const Tizen::Base::ByteBuffer& cbsSerialNumber, const Tizen::Base::String& text, int cbsMessageId, bool isEtwsNotification, byte dataCodingScheme, const Tizen::Base::String& languageType);
\r
318 Tizen::Base::DateTime __cbsMsgTime;
\r
319 Tizen::Base::ByteBuffer* __pCbsSerialNumber;
\r
320 Tizen::Base::String __cbsSenderMsg;
\r
321 Tizen::Base::String __cbslanguageType;
\r
322 int __cbsMessageId;
\r
323 bool __isEtwsNotification;
\r
324 byte __dataCodingScheme;
\r
325 }; // _CbsMessageImpl
\r
327 } } // Tizen::Messaging
\r
329 #endif // _FMSG_INTERNAL_CBS_MESSAGE_IMPL_H_
\r