From 1342309e45ef59f4ab94a7216d4385395f150cb9 Mon Sep 17 00:00:00 2001 From: Sehong Na Date: Thu, 7 Nov 2013 20:01:14 +0900 Subject: [PATCH] Init Tizen 2.2.1 --- inc/FMessaging.h | 6 +- inc/FMsgCbsChannel.h | 67 ++-- inc/FMsgCbsMessage.h | 422 ++++++++++++------------ inc/FMsgDetailedEmailMessage.h | 253 +++++++------- inc/FMsgEmailAttachment.h | 74 ++--- inc/FMsgEmailManager.h | 23 +- inc/FMsgEmailMessage.h | 89 ++--- inc/FMsgEtwsPrimaryNotification.h | 377 +++++++++++---------- inc/FMsgICbsMessageEventListener.h | 162 ++++----- inc/FMsgIEmailListener.h | 20 +- inc/FMsgIEtwsPrimaryNotificationEventListener.h | 170 +++++----- inc/FMsgIMmsListener.h | 20 +- inc/FMsgIPushEventListener.h | 30 +- inc/FMsgIPushManagerListener.h | 64 ++-- inc/FMsgISmsEventListener.h | 24 +- inc/FMsgISmsListener.h | 20 +- inc/FMsgISmsMessageEventListener.h | 22 +- inc/FMsgIWapPushEventListener.h | 33 +- inc/FMsgMmsManager.h | 47 +-- inc/FMsgMmsMessage.h | 104 +++--- inc/FMsgPushManager.h | 222 ++++++------- inc/FMsgPushMessage.h | 80 +++-- inc/FMsgRecipientList.h | 131 ++++---- inc/FMsgSmsManager.h | 314 +++++++++--------- inc/FMsgSmsMessage.h | 121 +++---- inc/FMsgTypes.h | 26 +- inc/FMsgWapPushManager.h | 108 +++--- inc/FMsgWapPushMessage.h | 62 ++-- packaging/osp-messaging.spec | 15 +- src/FMsgDetailedEmailMessage.cpp | 27 +- src/FMsgEmailAttachment.cpp | 9 +- src/FMsg_DetailedEmailMessageImpl.cpp | 33 +- src/FMsg_MsgUtil.cpp | 20 +- src/FMsg_PushMessageImpl.cpp | 48 +-- src/FMsg_SmsManagerImpl.cpp | 5 +- src/FMsg_SmsMmsCallbackHandler.cpp | 369 ++------------------- src/FMsg_SmsMmsCallbackHandler.h | 78 +---- src/FMsg_WapPushManagerImpl.cpp | 19 +- src/inc/FMsg_Types.h | 2 + 39 files changed, 1682 insertions(+), 2034 deletions(-) mode change 100644 => 100755 src/FMsg_DetailedEmailMessageImpl.cpp diff --git a/inc/FMessaging.h b/inc/FMessaging.h index e244683..dca338c 100644 --- a/inc/FMessaging.h +++ b/inc/FMessaging.h @@ -15,7 +15,7 @@ // limitations under the License. // /** - * @file FMessaging.h + * @file FMessaging.h * @brief This is the header file for the %Messaging namespace. * * This header file contains the declarations and descriptions of the %Messaging namespace. @@ -50,8 +50,8 @@ * @brief This namespace contains classes and interfaces for messaging services. * @since 2.0 * - * @remarks @b Header @b %file : @b \#include @b @n - * @b Library : @b osp-messaging + * @remarks @b Header @b %file: @b \#include @b @n + * @b Library: @b osp-messaging * * The %Messaging namespace accesses the messaging capabilities of the device. @n * It provides classes and interfaces for the following: @n diff --git a/inc/FMsgCbsChannel.h b/inc/FMsgCbsChannel.h index de1b940..2653f32 100755 --- a/inc/FMsgCbsChannel.h +++ b/inc/FMsgCbsChannel.h @@ -15,11 +15,11 @@ // limitations under the License. // /** -* @file FMsgCbsChannel.h -* @brief This is the header file for the %CbsChannel class. -* -* This header file contains the declarations of the %CbsChannel class. -*/ + * @file FMsgCbsChannel.h + * @brief This is the header file for the %CbsChannel class. + * + * This header file contains the declarations of the %CbsChannel class. + */ #ifndef _FMSG_CBS_CHANNEL_H_ #define _FMSG_CBS_CHANNEL_H_ @@ -36,29 +36,28 @@ namespace Tizen { namespace Messaging class _CbsChannelImpl; /** -* @class CbsChannel -* @brief This class provides methods for handling a Cell Broadcast Service (CBS) channel. -* -* @since 2.0 -* -* @final This class is not intended for extension. -* -* The %CbsChannel class provides methods for handling a CBS channel. @n -* It allows you to get and set the CBS channel information. -*/ + * @class CbsChannel + * @brief This class provides methods for handling a Cell Broadcast Service (CBS) channel. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %CbsChannel class provides methods for handling a CBS channel. It allows the user to get and set the CBS channel information. + */ class _OSP_EXPORT_ CbsChannel : public Tizen::Base::Object { public: - /** + /** * This destructor overrides Tizen::Base::Object::~Object(). * * @since 2.0 */ virtual ~CbsChannel(void); - /** + /** * Gets the range of a CBS channel. * * @since 2.0 @@ -69,31 +68,31 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_STATE The range has not been set as yet. * @exception E_SYSTEM A system error has occurred. - * @remarks In case of an error, this method sets the negative values for @c from and @c to. For example, @c -1. + * @remarks In case of an error, this method sets negative values for @c from and @c to. For example, @c -1. */ result GetRange(int& from, int& to) const; - /** + /** * Gets the name of a CBS channel. * * @since 2.0 * * @return The name of the channel @n - * The name can be an empty string. + * The name can be an empty string. */ Tizen::Base::String GetName(void) const; - /** + /** * Checks whether a CBS channel is activated. * * @since 2.0 * - * @return @c true if a CBS channel is activated, @n + * @return @c true if the CBS channel is activated, @n * else @c false */ bool IsActivated(void) const; - /** + /** * Activates the status of a CBS channel. * * @since 2.0 @@ -102,13 +101,13 @@ public: * * @return An error code * @exception E_SUCCESS The method is successful. - * @exception E_ILLEGAL_ACCESS The application does not have the permission to activate the CBS channel status. + * @exception E_ILLEGAL_ACCESS The application does not have the permission to activate the CBS channel's status. * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. */ result Activate(void); - /** + /** * Deactivates the status of a CBS channel. * * @since 2.0 @@ -117,13 +116,13 @@ public: * * @return An error code * @exception E_SUCCESS The method is successful. - * @exception E_ILLEGAL_ACCESS The application does not have the permission to activate the CBS channel status. + * @exception E_ILLEGAL_ACCESS The application does not have the permission to activate the CBS channel's status. * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. */ result Deactivate(void); - /** + /** * Updates the name of a CBS channel. * * @since 2.0 @@ -133,7 +132,7 @@ public: * @return An error code * @param[in] name The name of the CBS channel to update * @exception E_SUCCESS The method is successful. - * @exception E_ILLEGAL_ACCESS The application does not have the permission to update the CBS channel name. + * @exception E_ILLEGAL_ACCESS The application does not have the permission to update the CBS channel's name. * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. */ @@ -171,12 +170,12 @@ private: * @param[in] to The last index of the message ID of the channel * @param[in] name The name of the channel (can be an empty string) * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either of the following conditions has occurred: @n - * - The specified @c to parameter is smaller than @c from. @n - * - The specified @c to or @c from parameter is a negative value. @n - * - The specified @c to parameter exceeds the limit (0xFFFF). @n - * - The range (@c to - @c from) exceeds the limit (0xFFFF). @n - * - The specified @c name string length is greater than @c 32. @n + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c to parameter is smaller than @c from. + * - The specified @c to or @c from parameter is a negative value. + * - The specified @c to parameter exceeds the limit (0xFFFF). + * - The range (@c to - @c from) exceeds the limit (0xFFFF). + * - The specified @c name string length is greater than @c 32. * @exception E_SYSTEM A system error has occurred. */ result Construct(int from, int to, const Tizen::Base::String& name); diff --git a/inc/FMsgCbsMessage.h b/inc/FMsgCbsMessage.h index 264cd4e..d1a8804 100755 --- a/inc/FMsgCbsMessage.h +++ b/inc/FMsgCbsMessage.h @@ -1,211 +1,211 @@ -// -// Open Service Platform -// Copyright (c) 2012-2013 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. -// -/** -* @file FMsgCbsMessage.h -* @brief This is the header file for the %CbsMessage class. -* -* This header file contains the declarations of the %CbsMessage class. -*/ - -#ifndef _FMSG_CBS_MESSAGE_H_ -#define _FMSG_CBS_MESSAGE_H_ - -namespace Tizen { namespace Base -{ -class ByteBuffer; -class String; -class DateTime; -} } - -#include -#include - -namespace Tizen { namespace Messaging -{ - -class _CbsMessageImpl; - -/** -* @class CbsMessage -* -* @brief This class provides methods for handling a CBS message. -* -* @since 2.0 -* -* @final This class is not intended for extension. -* -* The %CbsMessage class provides methods for handling a CBS message (including the ETWS secondary notification). It allows you to get the serial number, -* message ID, body text, and received time of a CBS message. -*/ -class _OSP_EXPORT_ CbsMessage - : public Tizen::Base::Object -{ -public: - /** - * This destructor overrides Tizen::Base::Object::~Object(). - * - * @since 2.0 - */ - virtual ~CbsMessage(void); - - /** - * Compares the calling instance with the specified instance. - * - * @since 2.0 - * - * @return @c true if the specified instance of Tizen::Base::Object is equal to the calling %CbsMessage instance, @n - * else @c false - * @param[in] obj An instance of Tizen::Base::Object to compare - * @see Tizen::Base::Object::Equals() - */ - virtual bool Equals(const Tizen::Base::Object& obj) const; - - /** - * Copies the instance of a class. - * - * @since 2.0 - * - * @return An instance of %CbsMessage @n - * The value is @c null in case of an error. - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * - * @remarks The specific error code can be accessed using the GetLastResult() method. - */ - CbsMessage* CloneN(void) const; - - /** - * Gets the hash value of the current instance. - * - * @since 2.0 - * - * @return The hash value of the current instance - */ - virtual int GetHashCode(void) const; - - /** - * Checks whether this message is an ETWS notification. - * - * @since 2.0 - * - * @return @c true if this message is an ETWS notification, @n - * else @c false - * @remarks If the return value is @c true, the message is ETWS secondary notification. - */ - bool IsEtwsNotification(void) const; - - /** - * Gets the serial number of the CBS message. - * - * @since 2.0 - * - * @return The serial number of the CBS message @n - * The value is @c null in case of an error. - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks The specific error code can be accessed using the GetLastResult() method. - */ - Tizen::Base::ByteBuffer* GetSerialNumberN(void) const; - - /** - * Gets the message ID of the CBS message. - * - * @since 2.0 - * - * @return The message ID of the CBS message - */ - int GetMessageId(void) const; - - /** - * Gets the body of a message. - * - * @since 2.0 - * - * @return The body of a message - */ - Tizen::Base::String GetText(void) const; - - /** - * Gets the date and time (UTC time) of the message when it is received. - * - * @since 2.0 - * - * @return The date and time (UTC time) when the message is received - */ - Tizen::Base::DateTime GetReceivedTime(void) const; - - /** - * Gets the Data Coding Scheme of the CBS message. - * - * @since 2.0 - * - * @return The Data Coding Scheme of the CBS message @n - * The value is @c null in case of an error. - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks - * - The specific error code can be accessed using the GetLastResult() method. - * - The alphabet/coding and the language applied to CBS messages are defined in 3GPP TS 23.038. - */ - byte GetDataCodingScheme(void) const; - - /** - * Gets the language type of a message. - * - * @since 2.1 - * - * @return The language type of a message - */ - Tizen::Base::String GetLanguageType(void) const; - -private: - /** - * This default constructor is intentionally declared as private so that only the platform can create an instance. - * - * @since 2.0 - */ - CbsMessage(void); - - /** - * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. - * - * @since 2.0 - * - * @param[in] rhs An instance of %CbsMessage - */ - CbsMessage(const CbsMessage& rhs); - - /** - * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. @n - * - Use CloneN() to get an exact copy of the instance. - * - Use Equals() to compare the contents of one instance with the other. - * - * @since 2.0 - * - * @return A reference to this instance - * @param[in] rhs An instance of %CbsMessage - */ - CbsMessage& operator =(const CbsMessage& rhs); - -private: - _CbsMessageImpl* __pCbsMessageImpl; - - friend class _CbsMessageImpl; -}; // CbsMessage - -} } // Tizen::Messaging -#endif // _FMSG_CBS_MESSAGE_H_ +// +// Open Service Platform +// Copyright (c) 2012-2013 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. +// +/** + * @file FMsgCbsMessage.h + * @brief This is the header file for the %CbsMessage class. + * + * This header file contains the declarations of the %CbsMessage class. + */ + +#ifndef _FMSG_CBS_MESSAGE_H_ +#define _FMSG_CBS_MESSAGE_H_ + +namespace Tizen { namespace Base +{ +class ByteBuffer; +class String; +class DateTime; +} } + +#include +#include + +namespace Tizen { namespace Messaging +{ + +class _CbsMessageImpl; + +/** + * @class CbsMessage + * + * @brief This class provides methods for handling a CBS message. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %CbsMessage class provides methods for handling a CBS message (including a ETWS secondary notification). It allows the user to get the serial number, + * message ID, body text, and received time of a CBS message. + */ +class _OSP_EXPORT_ CbsMessage + : public Tizen::Base::Object +{ +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~CbsMessage(void); + + /** + * Compares the specified instance with the current instance. + * + * @since 2.0 + * + * @return @c true if the specified instance of Tizen::Base::Object is equal to the caurrent %CbsMessage instance, @n + * else @c false + * @param[in] obj An instance of Tizen::Base::Object to compare + * @see Tizen::Base::Object::Equals() + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + /** + * Copies the instance of this class. + * + * @since 2.0 + * + * @return An instance of %CbsMessage, @n + * else @c null in case of an error + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + CbsMessage* CloneN(void) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @return The hash value of the current instance + */ + virtual int GetHashCode(void) const; + + /** + * Checks whether this message is an ETWS notification. + * + * @since 2.0 + * + * @return @c true if this message is an ETWS notification, @n + * else @c false + * @remarks If the return value is @c true, the message is an ETWS secondary notification. + */ + bool IsEtwsNotification(void) const; + + /** + * Gets the serial number of a CBS message. + * + * @since 2.0 + * + * @return The serial number of the CBS message, @n + * else @c null in case of an error + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::ByteBuffer* GetSerialNumberN(void) const; + + /** + * Gets the message ID of a CBS message. + * + * @since 2.0 + * + * @return The message ID of the CBS message + */ + int GetMessageId(void) const; + + /** + * Gets the body of a message. + * + * @since 2.0 + * + * @return The body of the message + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the date and time (UTC time) of a message when it is received. + * + * @since 2.0 + * + * @return The date and time (UTC time) when the message is received + */ + Tizen::Base::DateTime GetReceivedTime(void) const; + + /** + * Gets the Data Coding Scheme of a CBS message. + * + * @since 2.0 + * + * @return The Data Coding Scheme of the CBS message, @n + * else @c null in case of an error + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The alphabet/coding and language applied to CBS messages are defined in 3GPP TS 23.038. + */ + byte GetDataCodingScheme(void) const; + + /** + * Gets the language type of a message. + * + * @since 2.1 + * + * @return The language type of the message + */ + Tizen::Base::String GetLanguageType(void) const; + +private: + /** + * This default constructor is intentionally declared as private so that only the platform can create an instance. + * + * @since 2.0 + */ + CbsMessage(void); + + /** + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + * + * @param[in] rhs An instance of %CbsMessage + */ + CbsMessage(const CbsMessage& rhs); + + /** + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. @n + * - Use CloneN() to get an exact copy of the instance. + * - Use Equals() to compare the contents of one instance with the other. + * + * @since 2.0 + * + * @return A reference to this instance + * @param[in] rhs An instance of %CbsMessage + */ + CbsMessage& operator =(const CbsMessage& rhs); + +private: + _CbsMessageImpl* __pCbsMessageImpl; + + friend class _CbsMessageImpl; +}; // CbsMessage + +} } // Tizen::Messaging +#endif // _FMSG_CBS_MESSAGE_H_ diff --git a/inc/FMsgDetailedEmailMessage.h b/inc/FMsgDetailedEmailMessage.h index 1776d8c..b470a90 100755 --- a/inc/FMsgDetailedEmailMessage.h +++ b/inc/FMsgDetailedEmailMessage.h @@ -15,11 +15,11 @@ // limitations under the License. // /** -* @file FMsgDetailedEmailMessage.h -* @brief This is the header file for the %DetailedEmailMessage class. -* -* This header file contains the declarations of the %DetailedEmailMessage class. -*/ + * @file FMsgDetailedEmailMessage.h + * @brief This is the header file for the %DetailedEmailMessage class. + * + * This header file contains the declarations of the %DetailedEmailMessage class. + */ #ifndef _FMSG_DETAILED_EMAIL_MESSAGE_H_ #define _FMSG_DETAILED_EMAIL_MESSAGE_H_ @@ -39,108 +39,108 @@ namespace Collection namespace Tizen { namespace Messaging { - /** + /** * @enum EmailMessageClass * - * Defines the class of the email messages. + * Defines the classes of an email message. * * @since 2.0 * */ enum EmailMessageClass { - EMAIL_MESSAGE_CLASS_UNSPECIFIED = 0, /**Messaging Guide. @@ -47,53 +47,53 @@ namespace Tizen { namespace Messaging { // Life cycle public: - /** + /** * This is the default constructor for this class. * * @since 2.0 */ EmailMessage(void); - /** + /** * This is the destructor for this class. * * @since 2.0 */ virtual ~EmailMessage(void); - /** + /** * This is the copy constructor for the %EmailMessage class. * * @since 2.0 * - * @param[in] value An instance of %EmailMessage + * @param[in] value An instance of %EmailMessage to copy */ EmailMessage(const EmailMessage& value); public: - /** - * This assignment operator copies an email message from the specified instance of %EmailMessage to the calling instance of %EmailMessage. + /** + * This assignment operator copies an email message from the specified instance of %EmailMessage to the current instance of %EmailMessage. * * @since 2.0 * - * @return The reference of this instance + * @return A reference of this instance * @param[in] rhs A reference to the %EmailMessage instance to copy */ EmailMessage& operator =(const EmailMessage& rhs); - /** - * Compares the calling instance with the specified instance. + /** + * Compares the specified instance with the current instance. * * @since 2.0 * - * @return @c true if the specified instance of Tizen::Base::Object is equal to the calling %EmailMessage instance, @n - * else @c false - * @param[in] obj The object to compare + * @return @c true if the specified instance of Tizen::Base::Object is equal to the current %EmailMessage instance, @n + * else @c false + * @param[in] obj The object to compare */ virtual bool Equals(const Tizen::Base::Object& obj) const; - /** + /** * Gets the hash value of the current instance. * * @since 2.0 @@ -104,35 +104,38 @@ namespace Tizen { namespace Messaging // Operation public: - /** - * Sets the subject of the email. + /** + * Sets the subject of an email. * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] subject The subject of the message * @exception E_SUCCESS The method is successful. - * @exception E_MAX_EXCEEDED The subject length of the message exceeds the maximum limit (Maximum 256 characters), - * or the total size of the subject, body, and attachment(s) exceeds the maximum limit (5MB). + * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: + * - The subject length of the message exceeds the maximum limit (Maximum 256 characters). + * - The total size of the subject, body, and attachment(s) exceeds the maximum limit (5MB). * @see GetSubject() */ result SetSubject(const Tizen::Base::String& subject); - /** - * Sets the body of the message. + /** + * Sets the body of a message. * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] text The body of the message * @exception E_SUCCESS The method is successful. - * @exception E_MAX_EXCEEDED The body length of the message exceeds the maximum limit (Maximum 2000 characters), - * or the total size of the subject, body, and attachment(s) exceeds the maximum limit (5MB). + * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: + * - The body length of the message exceeds the maximum limit (Maximum 2000 characters). + * - The total size of the subject, body, and attachment(s) exceeds the maximum limit (5MB). * @see GetText() */ result SetText(const Tizen::Base::String& text); - /** - * Adds a file attachment to the email. + + /** + * Adds a file attachment to an email. * * @if OSPCOMPAT * @brief [Compatibility] @@ -143,21 +146,23 @@ namespace Tizen { namespace Messaging * For more information, see @ref CompIoPathPage "here". * @endif * - * @return An error code + * @return An error code * @param[in] filePath The path of the file to attach * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The length of the specified @c filePath is too long or @c 0. + * @exception E_INVALID_ARG The length of the specified @c filePath is either too long or @c 0. * @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed. * @exception E_FILE_ALREADY_EXIST The file is already attached. - * @exception E_MAX_EXCEEDED The total size of the subject, body, and attachment(s) exceeds the maximum limit (5MB), or - * the number of attachments exceeds the limit (20 files). @n - * The total size of attachments must not exceed 5MB, and the total number of attached files must not exceed 20 files. + * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: + * - The total size of the subject, body, and attachment(s) exceeds the maximum limit (5MB). @n + * The total size of the attachments must not exceed 5MB. + * - The total number of attachments exceeds the maximum limit (20 files). @n + * The total number of attached files must not exceed 20 files. * @see GetAttachmentListN() */ result AddAttachment(const Tizen::Base::String& filePath); - /** + /** * Removes an attachment from an email. * * @if OSPCOMPAT @@ -169,17 +174,17 @@ namespace Tizen { namespace Messaging * For more information, see @ref CompIoPathPage "here". * @endif * - * @return An error code + * @return An error code * @param[in] filePath The path of the file to remove * @exception E_SUCCESS The method is successful. - * @exception E_FILE_NOT_FOUND The corresponding format file is not found. + * @exception E_FILE_NOT_FOUND The file with the corresponding format is not found. * @see AddAttachment() * @see GetAttachmentListN() */ result RemoveAttachment(const Tizen::Base::String& filePath); - /** - * Gets the subject of the message. + /** + * Gets the subject of a message. * * @since 2.0 * @@ -188,8 +193,8 @@ namespace Tizen { namespace Messaging */ Tizen::Base::String GetSubject(void) const; - /** - * Gets the body of the message. + /** + * Gets the body of a message. * * @since 2.0 * @@ -198,12 +203,12 @@ namespace Tizen { namespace Messaging */ Tizen::Base::String GetText(void) const; - /** - * Gets the list of attachments for the email. + /** + * Gets the list of attachments for an email. * * @since 2.0 * - * @return The list of the attached files + * @return The list of attached files * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. diff --git a/inc/FMsgEtwsPrimaryNotification.h b/inc/FMsgEtwsPrimaryNotification.h index 5b39df2..9a5c169 100755 --- a/inc/FMsgEtwsPrimaryNotification.h +++ b/inc/FMsgEtwsPrimaryNotification.h @@ -1,189 +1,188 @@ -// -// Open Service Platform -// Copyright (c) 2012-2013 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. -// -/** -* @file FMsgEtwsPrimaryNotification.h -* @brief This is the header file for the %EtwsPrimaryNotification class. -* -* This header file contains the declarations of the %EtwsPrimaryNotification class. -*/ - -#ifndef _FMSG_ETWS_PRIMARY_NOTIFICATION_H_ -#define _FMSG_ETWS_PRIMARY_NOTIFICATION_H_ - -namespace Tizen { namespace Base -{ -class DateTime; -class ByteBuffer; -} } - -#include -#include - -namespace Tizen { namespace Messaging -{ - -class _EtwsPrimaryNotificationImpl; - -/** -* @class EtwsPrimaryNotification -* -* @brief This class provides methods for handling an ETWS primary notification. -* -* @since 2.0 -* -* @final This class is not intended for extension. -* -* The %EtwsPrimaryNotification class provides methods for handling an ETWS primary notification. It allows you to get the serial number, -* message ID, warning type, warning security info, and received time of an ETWS primary notification. -*/ -class _OSP_EXPORT_ EtwsPrimaryNotification - : public Tizen::Base::Object -{ -public: - /** - * This destructor overrides Tizen::Base::Object::~Object(). - * - * @since 2.0 - */ - virtual ~EtwsPrimaryNotification(void); - - /** - * Compares the specified instance of %EtwsPrimaryNotification with the calling instance. - * - * @since 2.0 - * - * @return @c true if the values match, @n - * else @c false - * @param[in] obj The other Tizen::Base::Object to compare - * @see Tizen::Base::Object::Equals() - */ - virtual bool Equals(const Tizen::Base::Object& obj) const; - - /** - * Gets the copied instance of the class. - * - * @since 2.0 - * - * @return An instance of %EtwsPrimaryNotification @n - * The value is @c null in case of an error. - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * - * @remarks The specific error code can be accessed using the GetLastResult() method. - */ - EtwsPrimaryNotification* CloneN(void) const; - - /** - * Gets the hash value of the current instance. - * - * @since 2.0 - * - * @return The current instance's hash value - */ - virtual int GetHashCode(void) const; - - /** - * Gets the date and time (UTC time) of the message when it is received. - * - * @since 2.0 - * - * @return The date and time (UTC time) when the message is received - */ - Tizen::Base::DateTime GetReceivedTime(void) const; - - /** - * Gets the serial number of the ETWS primary notification. - * - * @since 2.0 - * - * @return The serial number of the ETWS primary notification - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks - * - The specific error code can be accessed using the GetLastResult() method. - * - In case of an error, this method returns @c null. - */ - Tizen::Base::ByteBuffer* GetSerialNumberN(void) const; - - /** - * Gets the message ID of the ETWS primary notification. - * - * @since 2.0 - * - * @return The message ID of the ETWS primary notification - */ - int GetMessageId(void) const; - - /** - * Gets the warning type. - * - * @since 2.0 - * - * @return The ETWS warning type of the message - */ - Tizen::Base::ByteBuffer* GetWarningTypeN(void) const; - - /** - * Gets the warning security information of the ETWS primary notification. - * - * @since 2.0 - * - * @return The warning security information of the ETWS primary notification @n - * The value is @c null in case of an error. - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks The specific error code can be accessed using the GetLastResult() method. - */ - Tizen::Base::ByteBuffer* GetWarningSecurityInfoN(void) const; - -private: - /** - * This default constructor is intentionally declared as private so that only the platform can create an instance. - * - * @since 2.0 - */ - EtwsPrimaryNotification(void); - - /** - * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. - * - * @since 2.0 - * - * @param[in] rhs An instance of EtwsPrimaryNotification - */ - EtwsPrimaryNotification(const EtwsPrimaryNotification& rhs); - - /** - * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. @n - * - Use CloneN() to get an exact copy of the instance. - * - Use Equals() to compare the contents of one instance with the other. - * - * @since 2.0 - * - * @return A reference to this instance - * @param[in] rhs An instance of EtwsPrimaryNotification - */ - EtwsPrimaryNotification& operator =(const EtwsPrimaryNotification& rhs); - -private: - _EtwsPrimaryNotificationImpl* __pEtwsPrimaryNotificationImpl; - - friend class _EtwsPrimaryNotificationImpl; -}; // EtwsPrimaryNotification - -} } // Tizen::Messaging -#endif // _FMSG_ETWS_PRIMARY_NOTIFICATION_H_ +// +// Open Service Platform +// Copyright (c) 2012-2013 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. +// +/** + * @file FMsgEtwsPrimaryNotification.h + * @brief This is the header file for the %EtwsPrimaryNotification class. + * + * This header file contains the declarations of the %EtwsPrimaryNotification class. + */ + +#ifndef _FMSG_ETWS_PRIMARY_NOTIFICATION_H_ +#define _FMSG_ETWS_PRIMARY_NOTIFICATION_H_ + +namespace Tizen { namespace Base +{ +class DateTime; +class ByteBuffer; +} } + +#include +#include + +namespace Tizen { namespace Messaging +{ + +class _EtwsPrimaryNotificationImpl; + +/** + * @class EtwsPrimaryNotification + * + * @brief This class provides methods for handling an ETWS primary notification. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %EtwsPrimaryNotification class provides methods for handling an ETWS primary notification. It allows the user to get the serial number, + * message ID, warning type, warning security info, and received time of an ETWS primary notification. + */ +class _OSP_EXPORT_ EtwsPrimaryNotification + : public Tizen::Base::Object +{ +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~EtwsPrimaryNotification(void); + + /** + * Compares the specified instance of %EtwsPrimaryNotification with the current instance. + * + * @since 2.0 + * + * @return @c true if the values match, @n + * else @c false + * @param[in] obj The other Tizen::Base::Object to compare + * @see Tizen::Base::Object::Equals() + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + /** + * Gets the copied instance of this class. + * + * @since 2.0 + * + * @return An instance of %EtwsPrimaryNotification, @n + * else @c null in case of an error + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + EtwsPrimaryNotification* CloneN(void) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @return The hash value of the current instance + */ + virtual int GetHashCode(void) const; + + /** + * Gets the date and time (UTC time) of a message when it is received. + * + * @since 2.0 + * + * @return The date and time (UTC time) when the message is received + */ + Tizen::Base::DateTime GetReceivedTime(void) const; + + /** + * Gets the serial number of an ETWS primary notification. + * + * @since 2.0 + * + * @return The serial number of the ETWS primary notification, @n + * else @c null in case of an error + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::ByteBuffer* GetSerialNumberN(void) const; + + /** + * Gets the message ID of an ETWS primary notification. + * + * @since 2.0 + * + * @return The message ID of the ETWS primary notification + */ + int GetMessageId(void) const; + + /** + * Gets the warning type of a message. + * + * @since 2.0 + * + * @return The ETWS warning type of the message + */ + Tizen::Base::ByteBuffer* GetWarningTypeN(void) const; + + /** + * Gets the warning security information of an ETWS primary notification. + * + * @since 2.0 + * + * @return The warning security information of the ETWS primary notification, @n + * else @c null in case of an error + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::ByteBuffer* GetWarningSecurityInfoN(void) const; + +private: + /** + * This default constructor is intentionally declared as private so that only the platform can create an instance. + * + * @since 2.0 + */ + EtwsPrimaryNotification(void); + + /** + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + * + * @param[in] rhs An instance of EtwsPrimaryNotification + */ + EtwsPrimaryNotification(const EtwsPrimaryNotification& rhs); + + /** + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. @n + * - Use CloneN() to get an exact copy of the instance. + * - Use Equals() to compare the contents of one instance with the other. + * + * @since 2.0 + * + * @return A reference to this instance + * @param[in] rhs An instance of EtwsPrimaryNotification + */ + EtwsPrimaryNotification& operator =(const EtwsPrimaryNotification& rhs); + +private: + _EtwsPrimaryNotificationImpl* __pEtwsPrimaryNotificationImpl; + + friend class _EtwsPrimaryNotificationImpl; +}; // EtwsPrimaryNotification + +} } // Tizen::Messaging +#endif // _FMSG_ETWS_PRIMARY_NOTIFICATION_H_ diff --git a/inc/FMsgICbsMessageEventListener.h b/inc/FMsgICbsMessageEventListener.h index dc87eeb..25ad3fb 100755 --- a/inc/FMsgICbsMessageEventListener.h +++ b/inc/FMsgICbsMessageEventListener.h @@ -1,81 +1,81 @@ -// -// Open Service Platform -// Copyright (c) 2012-2013 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. -// -/** -* @file FMsgICbsMessageEventListener.h -* @brief This is the header file for the %ICbsMessageEventListener interface. -* -* This header file contains the declarations of the %ICbsMessageEventListener interface. -*/ - -#ifndef _FMSG_ICBS_MESSAGE_EVENT_LISTENER_H_ -#define _FMSG_ICBS_MESSAGE_EVENT_LISTENER_H_ - -namespace Tizen { namespace Messaging -{ - class CbsMessage; - - /** - * @interface ICbsMessageEventListener - * @brief This interface is the listener interface for receiving CBS messages. - * - * @since 2.0 - * - * The %ICbsMessageEventListener interface must be implemented to handle incoming CBS messages. An application must register this interface using the SmsManager::SetCbsMessageEventListener() method. - */ - class _OSP_EXPORT_ ICbsMessageEventListener - : virtual public Tizen::Base::Runtime::IEventListener - { - public: - /** - * This polymorphic destructor should be overridden if required. @n - * This way, the destructors of the derived classes are called when the destructor of this interface is called. - * - * @since 2.0 - */ - virtual ~ICbsMessageEventListener(void) {} - - /** - * Called when a CBS message is received. - * - * @since 2.0 - * - * @param[in] message The message that is received - * @see SmsManager::SetCbsMessageEventListener() - */ - virtual void OnCbsMessageReceived(const CbsMessage& message) = 0; - - protected: - // - // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. - // - // This method is reserved and may change its name at any time without prior notice. - // - // @since 2.0 - // - virtual void ICbsMessageEventListener_Reserved1(void) {} - - // - // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. - // - // This method is reserved and may change its name at any time without prior notice. - // - // @since 2.0 - // - virtual void ICbsMessageEventListener_Reserved2(void) {} - }; // ICbsMessageEventListener -} } // Tizen::Messaging -#endif // _FMSG_ICBS_MESSAGE_EVENT_LISTENER_H_ +// +// Open Service Platform +// Copyright (c) 2012-2013 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. +// +/** + * @file FMsgICbsMessageEventListener.h + * @brief This is the header file for the %ICbsMessageEventListener interface. + * + * This header file contains the declarations of the %ICbsMessageEventListener interface. + */ + +#ifndef _FMSG_ICBS_MESSAGE_EVENT_LISTENER_H_ +#define _FMSG_ICBS_MESSAGE_EVENT_LISTENER_H_ + +namespace Tizen { namespace Messaging +{ + class CbsMessage; + + /** + * @interface ICbsMessageEventListener + * @brief This interface is the listener interface for receiving CBS messages. + * + * @since 2.0 + * + * The %ICbsMessageEventListener interface must be implemented to handle incoming CBS messages. An application must register this interface using the %SmsManager::SetCbsMessageEventListener() method. + */ + class _OSP_EXPORT_ ICbsMessageEventListener + : virtual public Tizen::Base::Runtime::IEventListener + { + public: + /** + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ + virtual ~ICbsMessageEventListener(void) {} + + /** + * Called when a CBS message is received. + * + * @since 2.0 + * + * @param[in] message The message that is received + * @see SmsManager::SetCbsMessageEventListener() + */ + virtual void OnCbsMessageReceived(const CbsMessage& message) = 0; + + protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + // @since 2.0 + // + virtual void ICbsMessageEventListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + // @since 2.0 + // + virtual void ICbsMessageEventListener_Reserved2(void) {} + }; // ICbsMessageEventListener +} } // Tizen::Messaging +#endif // _FMSG_ICBS_MESSAGE_EVENT_LISTENER_H_ diff --git a/inc/FMsgIEmailListener.h b/inc/FMsgIEmailListener.h index a749039..b4dab4d 100755 --- a/inc/FMsgIEmailListener.h +++ b/inc/FMsgIEmailListener.h @@ -31,13 +31,13 @@ namespace Tizen { namespace Messaging { - /** + /** * @interface IEmailListener - * @brief This interface is the listener interface for receiving email sent status. + * @brief This interface is the listener interface for receiving the status of a sent email. * * @since 2.0 * - * The %IEmailListener interface must be implemented to receive the status of the sent email messages asynchronously. An application must register this interface using the EmailManager::Construct() method. + * The %IEmailListener interface must be implemented to receive the status of sent email messages asynchronously. An application must register this interface using the %EmailManager::Construct() method. * * For more information on the class features, see Messaging Guide. */ @@ -46,17 +46,17 @@ namespace Tizen { namespace Messaging { // Lifecycle public: - /** - * This is the destructor for this class. - * - * @since 2.0 - */ + /** + * This is the destructor for this class. + * + * @since 2.0 + */ virtual ~IEmailListener(void) {} // Operation public: - /** - * Called when the email message is sent. + /** + * Called when an email message is sent. * * @since 2.0 * diff --git a/inc/FMsgIEtwsPrimaryNotificationEventListener.h b/inc/FMsgIEtwsPrimaryNotificationEventListener.h index 2ac2a08..758cc1e 100755 --- a/inc/FMsgIEtwsPrimaryNotificationEventListener.h +++ b/inc/FMsgIEtwsPrimaryNotificationEventListener.h @@ -1,85 +1,85 @@ -// -// Open Service Platform -// Copyright (c) 2012-2013 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. -// -/** -* @file FMsgIEtwsPrimaryNotificationEventListener.h -* @brief This is the header file for the %IEtwsPrimaryNotificationEventListener interface. -* -* This header file contains the declarations of the %IEtwsPrimaryNotificationEventListener interface. -*/ - -#ifndef _FMSG_IETWS_PRIMARY_NOTIFICATION_EVENT_LISTENER_H_ -#define _FMSG_IETWS_PRIMARY_NOTIFICATION_EVENT_LISTENER_H_ - -#include - -namespace Tizen { namespace Messaging -{ - class EtwsPrimaryNotification; - - /** - * @interface IEtwsPrimaryNotificationEventListener - * @brief This interface is the listener interface for receiving ETWS primary notification. - * - * @since 2.0 - * - * The %IEtwsPrimaryNotificationEventListener interface must be implemented to handle incoming ETWS primary notification. - * An application must register this interface using the SmsManager::SetEtwsPrimaryNotificationEventListener() method. - */ - class _OSP_EXPORT_ IEtwsPrimaryNotificationEventListener - : virtual public Tizen::Messaging::ICbsMessageEventListener - { - public: - /** - * This polymorphic destructor should be overridden if required. @n - * This way, the destructors of the derived classes are called when the destructor of this interface is called. - - * - * @since 2.0 - */ - virtual ~IEtwsPrimaryNotificationEventListener(void) {} - - /** - * Called when the ETWS primary notification is received. - * - * @since 2.0 - * - * @param[in] message The ETWS primary notification that is received - * @see SmsManager::SetEtwsPrimaryNotificationEventListener() - */ - virtual void OnEtwsPrimaryNotificationReceived(const EtwsPrimaryNotification& message) = 0; - - protected: - // - // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. - // - // This method is reserved and may change its name at any time without prior notice. - // - // @since 2.0 - // - virtual void IEtwsPrimaryNotificationEventListener_Reserved1(void) {} - - // - // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. - // - // This method is reserved and may change its name at any time without prior notice. - // - // @since 2.0 - // - virtual void IEtwsPrimaryNotificationEventListener_Reserved2(void) {} - }; // IEtwsPrimaryNotificationEventListener -} } // Tizen::Messaging -#endif // _FMSG_IETWS_PRIMARY_NOTIFICATION_EVENT_LISTENER_H_ +// +// Open Service Platform +// Copyright (c) 2012-2013 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. +// +/** + * @file FMsgIEtwsPrimaryNotificationEventListener.h + * @brief This is the header file for the %IEtwsPrimaryNotificationEventListener interface. + * + * This header file contains the declarations of the %IEtwsPrimaryNotificationEventListener interface. + */ + +#ifndef _FMSG_IETWS_PRIMARY_NOTIFICATION_EVENT_LISTENER_H_ +#define _FMSG_IETWS_PRIMARY_NOTIFICATION_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Messaging +{ + class EtwsPrimaryNotification; + + /** + * @interface IEtwsPrimaryNotificationEventListener + * @brief This interface is the listener interface for receiving an ETWS primary notification. + * + * @since 2.0 + * + * The %IEtwsPrimaryNotificationEventListener interface must be implemented to handle an incoming ETWS primary notification. @n + * An application must register this interface using the SmsManager::SetEtwsPrimaryNotificationEventListener() method. + */ + class _OSP_EXPORT_ IEtwsPrimaryNotificationEventListener + : virtual public Tizen::Messaging::ICbsMessageEventListener + { + public: + /** + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * + * @since 2.0 + */ + virtual ~IEtwsPrimaryNotificationEventListener(void) {} + + /** + * Called when an ETWS primary notification is received. + * + * @since 2.0 + * + * @param[in] message The ETWS primary notification that is received + * @see SmsManager::SetEtwsPrimaryNotificationEventListener() + */ + virtual void OnEtwsPrimaryNotificationReceived(const EtwsPrimaryNotification& message) = 0; + + protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + // @since 2.0 + // + virtual void IEtwsPrimaryNotificationEventListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // This method is reserved and may change its name at any time without prior notice. + // + // @since 2.0 + // + virtual void IEtwsPrimaryNotificationEventListener_Reserved2(void) {} + }; // IEtwsPrimaryNotificationEventListener +} } // Tizen::Messaging +#endif // _FMSG_IETWS_PRIMARY_NOTIFICATION_EVENT_LISTENER_H_ diff --git a/inc/FMsgIMmsListener.h b/inc/FMsgIMmsListener.h index 85e3f48..4890880 100755 --- a/inc/FMsgIMmsListener.h +++ b/inc/FMsgIMmsListener.h @@ -32,13 +32,13 @@ namespace Tizen { namespace Messaging { - /** + /** * @interface IMmsListener - * @brief This interface is the listener interface for receiving MMS sent status. + * @brief This interface is the listener interface for receiving the status of a sent MMS. * * @since 2.0 * - * The %IMmsListener interface must be implemented to receive the status of the sent MMS messages asynchronously. An application must register this interface using the MmsManager::Construct() method. + * The %IMmsListener interface must be implemented to receive the status of sent MMS messages asynchronously. An application must register this interface using the %MmsManager::Construct() method. * * For more information on the class features, see Messaging Guide. */ @@ -47,17 +47,17 @@ namespace Tizen { namespace Messaging { // Lifecycle public: - /** - * This is the destructor for this class. - * - * @since 2.0 - */ + /** + * This is the destructor for this class. + * + * @since 2.0 + */ virtual ~IMmsListener(void) {} // Operation public: - /** - * Called when the Multimedia Messaging Service(MMS) message is sent. + /** + * Called when a Multimedia Messaging Service(MMS) message is sent. * * @since 2.0 * diff --git a/inc/FMsgIPushEventListener.h b/inc/FMsgIPushEventListener.h index 931e8c8..9918720 100755 --- a/inc/FMsgIPushEventListener.h +++ b/inc/FMsgIPushEventListener.h @@ -30,31 +30,33 @@ namespace Tizen { namespace Messaging { /** -* @interface IPushEventListener -* @brief This interface is the listener interface for receiving push messages. -* -* @since 2.0 -* -* The %IPushEventListener interface must be implemented to receive the push messages. An application must register this interface using the PushManager::Construct() method. -*/ + * @interface IPushEventListener + * @brief This interface is the listener interface for receiving push messages. + * + * @since 2.0 + * + * The %IPushEventListener interface must be implemented to receive push messages. @n + * An application must register this interface using the PushManager::Construct() method. + */ class _OSP_EXPORT_ IPushEventListener : virtual public Tizen::Base::Runtime::IEventListener { public: - /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. - * - * @since 2.0 - */ + /** + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ virtual ~IPushEventListener(void) {} public: - /** + /** * Called when a push message is received from the server. * * @since 2.0 * - * @param[in] message The push message + * @param[in] message The push message that is received */ virtual void OnPushMessageReceived(const PushMessage& message) = 0; diff --git a/inc/FMsgIPushManagerListener.h b/inc/FMsgIPushManagerListener.h index 97a6eb0..e2a1594 100755 --- a/inc/FMsgIPushManagerListener.h +++ b/inc/FMsgIPushManagerListener.h @@ -29,47 +29,50 @@ namespace Tizen { namespace Messaging { /** -* @interface IPushManagerListener -* @brief This interface is the listener interface that receives the registration result. -* -* @since 2.0 -* -* The %IPushManagerListener interface must be implemented to receive results of the push event registration. An application must register this interface using the PushManager::Construct() method. -*/ + * @interface IPushManagerListener + * @brief This interface is the listener interface that receives a registration result. + * + * @since 2.0 + * + * The %IPushManagerListener interface must be implemented to receive the results of a push event registration. @n + * An application must register this interface using the PushManager::Construct() method. + */ class _OSP_EXPORT_ IPushManagerListener : virtual public Tizen::Base::Runtime::IEventListener { public: - /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called. - * - * @since 2.0 - */ + /** + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ virtual ~IPushManagerListener(void) {} public: - /** + /** * Called when the result is received from PushManager::RegisterPushService(). * * @since 2.0 * - * @param[in] reqId The request ID - * @param[in] registrationId The registration ID of the device @n - * The application must deliver this ID to the application server. - * @param[in] r The result of the request - * @param[in] errorCode The error code from the server - * @param[in] errorMsg The error message from the server - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM An unknown operating system error has occurred. - * @exception E_CONNECTION_FAILED The network connection has failed. - * @exception E_SERVER An error has occurred on the server side. + * @param[in] reqId The request ID + * @param[in] registrationId The registration ID of the device @n + * The application must deliver this ID to the application server. + * @param[in] r The result of the request + * @param[in] errorCode The error code from the server + * @param[in] errorMsg The error message from the server + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM An unknown operating system error has occurred. + * @exception E_CONNECTION_FAILED The network connection has failed. + * @exception E_SERVER An error has occurred on the server side. * @exception E_SERVICE_UNAVAILABLE The service is unavailable. @n - * Check whether the push service registration is completed. For more information, see Push Messaging Guide. + * Check whether the push service registration is completed. @n + * For more information, see Push Messaging Guide. * @see PushManager::RegisterPushService() */ virtual void OnPushServiceRegistered(RequestId reqId, const Tizen::Base::String& registrationId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMsg) = 0; - /** + /** * Called when the result is received from PushManager::UnregisterPushService(). * * @since 2.0 @@ -86,7 +89,7 @@ public: */ virtual void OnPushServiceUnregistered(RequestId reqId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMsg) = 0; - /** + /** * Called when the result is received from PushManager::SendPushMessage(). * * @since 2.0 @@ -94,17 +97,18 @@ public: * @param[in] reqId The request ID * @param[in] registrationId The registration ID of the recipient * @param[in] r The result of the request, @n - * The following exceptions may be given through this parameter. + * The following exceptions may be given through this parameter. * @param[in] errorCode The error code from the server * @param[in] errorMsg The error message from the server * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_DATA An invalid data is received from the server. + * @exception E_INVALID_DATA Invalid data is received from the server. * @exception E_CONNECTION_FAILED The network connection has failed. * @exception E_REMOTE_DEVICE_NOT_FOUND The registration ID is invalid, so the recipient is not found. - * @exception E_AUTHENTICATION The appSecret is invalid, so application authentication has failed. + * @exception E_AUTHENTICATION The appSecret is invalid, so the application authentication has failed. * @exception E_SERVER An error has occurred on the server side. * @exception E_SERVICE_UNAVAILABLE The service is unavailable. @n - * Check whether the push service registration is completed. For more information, see Push Messaging Guide. + * Check whether the push service registration is completed. @n + * For more information, see Push Messaging Guide. * @see PushManager::SendPushMessage() */ virtual void OnPushMessageSent(RequestId reqId, const Tizen::Base::String& registrationId, result r, const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMsg) {} diff --git a/inc/FMsgISmsEventListener.h b/inc/FMsgISmsEventListener.h index 4e22dc1..0f207f9 100755 --- a/inc/FMsgISmsEventListener.h +++ b/inc/FMsgISmsEventListener.h @@ -32,14 +32,14 @@ namespace Tizen { namespace Messaging class SmsMessage; - /** + /** * @interface ISmsEventListener * @brief This interface is the listener interface for receiving SMS messages. * * @since 2.0 * - * The %ISmsEventListener interface is the listener interface for receiving SMS messages. - * An application implements this interface and registers it using the SmsManager::AddSmsEventListener() method to receive SMS messages. + * The %ISmsEventListener interface is the listener interface for receiving SMS messages via a specific port. @n + * An application implements this interface and registers it using the SmsManager::AddSmsEventListener() method to receive SMS messages. * * For more information on the class features, see Messaging Guide. */ @@ -48,25 +48,25 @@ namespace Tizen { namespace Messaging { // Lifecycle public: - /** - * This is the destructor for this class. - * - * @since 2.0 - */ + /** + * This is the destructor for this class. + * + * @since 2.0 + */ virtual ~ISmsEventListener(void) {} // Operations public: - /** + /** * Called when an SMS message is received. * * @since 2.0 * - * @param[in] port A port number + * @param[in] port The port number * @param[in] dateTime The date and time when the message is received * @param[in] message The message that is received - * @see SmsManager::AddSmsEventListener() - * @see SmsManager::RemoveSmsEventListener() + * @see SmsManager::AddSmsEventListener() + * @see SmsManager::RemoveSmsEventListener() */ virtual void OnSmsMessageReceived(int port, const Tizen::Base::DateTime& dateTime, const SmsMessage& message) = 0; diff --git a/inc/FMsgISmsListener.h b/inc/FMsgISmsListener.h index abea341..cad2ccb 100755 --- a/inc/FMsgISmsListener.h +++ b/inc/FMsgISmsListener.h @@ -30,13 +30,13 @@ namespace Tizen { namespace Messaging { - /** + /** * @interface ISmsListener - * @brief This interface is the listener interface for receiving SMS sent status. + * @brief This interface is the listener interface for receiving the status of a sent SMS. * * @since 2.0 * - * The %ISmsListener interface must be implemented to receive the status of the sent SMS messages asynchronously. An application must register this interface using the SmsManager::Construct() method. + * The %ISmsListener interface must be implemented and registered using the SmsManager::Construct() method to receive the status of sent SMS messages asynchronously. * * For more information on the class features, see Messaging Guide. */ @@ -45,17 +45,17 @@ namespace Tizen { namespace Messaging { // Lifecycle public: - /** - * This is the destructor for this class. - * - * @since 2.0 - */ + /** + * This is the destructor for this class. + * + * @since 2.0 + */ virtual ~ISmsListener(void) {} // Operation public: - /** - * Called when the SMS message is sent. + /** + * Called when an SMS message is sent. * * @since 2.0 * diff --git a/inc/FMsgISmsMessageEventListener.h b/inc/FMsgISmsMessageEventListener.h index a18fdd3..20d3163 100755 --- a/inc/FMsgISmsMessageEventListener.h +++ b/inc/FMsgISmsMessageEventListener.h @@ -15,7 +15,7 @@ // limitations under the License. // /** - * @file FMsgISmsMessageEventListener.h + * @file FMsgISmsMessageEventListener.h * @brief This is the header file for the %ISmsMessageEventListener interface. * * This header file contains the declarations of the %ISmsMessageEventListener interface. @@ -30,13 +30,13 @@ namespace Tizen { namespace Messaging { class SmsMessage; - /** + /** * @interface ISmsMessageEventListener * @brief This interface is the listener interface for receiving SMS messages. * * @since 2.0 * - * The %ISmsMessageEventListener interface must be implemented to handle incoming SMS messages. An application must register this interface using the SmsManager::AddSmsMessageEventListener() method. + * The %ISmsMessageEventListener interface must be implemented and registered using the SmsManager::AddSmsMessageEventListener() method to handle incoming SMS messages. * * For more information on the class features, see Messaging Guide. */ @@ -45,23 +45,23 @@ namespace Tizen { namespace Messaging { // Lifecycle public: - /** - * This is the destructor for this class. - * - * @since 2.0 - */ + /** + * This is the destructor for this class. + * + * @since 2.0 + */ virtual ~ISmsMessageEventListener(void) {} // Operations public: - /** - * Called when the SMS message is received. + /** + * Called when an SMS message is received. * * @since 2.0 * * @param[in] message The message that is received * @see SmsManager::AddSmsMessageEventListener() - * @see SmsManager::RemoveSmsMessageEventListener() + * @see SmsManager::RemoveSmsMessageEventListener() */ virtual void OnSmsMessageReceived(const SmsMessage& message) = 0; diff --git a/inc/FMsgIWapPushEventListener.h b/inc/FMsgIWapPushEventListener.h index 606da95..64ac77b 100755 --- a/inc/FMsgIWapPushEventListener.h +++ b/inc/FMsgIWapPushEventListener.h @@ -15,11 +15,11 @@ // limitations under the License. // /** -* @file FMsgIWapPushEventListener.h -* @brief This is the header file for the %IWapPushEventListener interface. -* -* This header file contains the declarations of the %IWapPushEventListener interface. -*/ + * @file FMsgIWapPushEventListener.h + * @brief This is the header file for the %IWapPushEventListener interface. + * + * This header file contains the declarations of the %IWapPushEventListener interface. + */ #ifndef _FMSG_IWAP_PUSH_EVENT_LISTENER_H_ #define _FMSG_IWAP_PUSH_EVENT_LISTENER_H_ @@ -30,27 +30,28 @@ namespace Tizen { namespace Messaging { /** -* @interface IWapPushEventListener -* @brief This interface is the listener interface for receiving WAP Push messages. -* -* @since 2.0 -* -* The %IWapPushEventListener interface must be implemented to receive WAP Push messages. An application must register this interface using the WapPushManager::AddWapPushEventListener() method. -*/ + * @interface IWapPushEventListener + * @brief This interface is the listener interface for receiving WAP Push messages. + * + * @since 2.0 + * + * The %IWapPushEventListener interface must be implemented to receive WAP Push messages. + * An application must register this interface using the WapPushManager::AddWapPushEventListener() method. + */ class _OSP_EXPORT_ IWapPushEventListener : virtual public Tizen::Base::Runtime::IEventListener { public: - /** - * This polymorphic destructor should be overridden if required. This way, the destructors of the derived - * classes are called when the destructor of this interface is called. + /** + * This polymorphic destructor should be overridden if required. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. * * @since 2.0 */ virtual ~IWapPushEventListener(void) {} public: - /** + /** * Called when a WAP Push message is received. * * @since 2.0 diff --git a/inc/FMsgMmsManager.h b/inc/FMsgMmsManager.h index 5d3de8b..38b6bed 100755 --- a/inc/FMsgMmsManager.h +++ b/inc/FMsgMmsManager.h @@ -15,7 +15,7 @@ // limitations under the License. // /** - * @file FMsgMmsManager.h + * @file FMsgMmsManager.h * @brief This is the header file for the %MmsManager class. * * This header file contains the declarations of the %MmsManager class. @@ -37,13 +37,13 @@ namespace Tizen { namespace Messaging // forward declaration for class extension class _MmsManagerImpl; - /** + /** * @class MmsManager - * @brief This class provides methods to use the MMS messaging service. + * @brief This class provides methods to use the Multimedia Messaging Service. * * @since 2.0 * - * The %MmsManager class is used to send MMS messages. + * The %MmsManager class is used to send Multimedia Messaging Service. * * For more information on the class features, see Messaging Guide. * @@ -95,8 +95,8 @@ namespace Tizen { namespace Messaging MmsMessage mmsMessage; r = mmsMessage.SetSubject(L"Subject!!!"); r = mmsMessage.SetText(L"Hello, World"); - r = mmsMessage.AddAttachment(MMS_IMAGE, L"/Home/Res/image.jpg"); - r = mmsMessage.AddAttachment(MMS_IMAGE, L"/Home/Res/audio.wav"); + r = mmsMessage.AddAttachment(MMS_IMAGE, L"/opt/usr/media/image.jpg"); + r = mmsMessage.AddAttachment(MMS_AUDIO, L"/opt/usr/media/audio.wav"); // Sends the message, and set the saveToSentbox parameter to true if the message should be saved in the Sentbox; otherwise, set to false. // MmsListener callback is called once the message has been completely sent. @@ -110,14 +110,14 @@ namespace Tizen { namespace Messaging { // Life cycle public: - /** + /** * This is the default constructor for this class. * * @since 2.0 */ MmsManager(void); - /** + /** * This is the destructor for this class. * * @since 2.0 @@ -130,25 +130,25 @@ namespace Tizen { namespace Messaging // Operation public: - /** + /** * Initializes this instance of %MmsManager with the specified parameter. * * @since 2.0 * * @feature %http://tizen.org/feature/network.telephony.mms * @return An error code - * @param[in] listener The listener to receive a send result asynchronously - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @param[in] listener The listener to receive the sent result asynchronously + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. - * @remarks Before calling this method, check whether the feature is supported by + * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). */ - result Construct(IMmsListener &listener); + result Construct(IMmsListener &listener); - /** - * Sends the MMS message. + /** + * Sends the specified MMS message. * * @since 2.0 * @privlevel public @@ -161,6 +161,7 @@ namespace Tizen { namespace Messaging * @param[in] saveToSentbox Set to @c true to save the message in the Sentbox, @n * else @c false * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM The method cannot proceed due to a severe system error. * @exception E_ON_INITIALIZING The mailbox is not completely loaded as yet. * @exception E_STORAGE_FULL The storage is full. * @exception E_DEVICE_UNAVAILABLE The device is unavailable. @@ -168,15 +169,17 @@ namespace Tizen { namespace Messaging * @exception E_INVALID_CONDITION The profile is not set. * @exception E_INVALID_ADDRESS The address is invalid. * @exception E_FDN_MODE The FDN mode has been activated. - * @exception E_INVALID_ARG The number of recipients is @c 0 or the message is empty. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The number of recipients is @c 0. + * - The message is empty. * @exception E_MAX_EXCEEDED The number of recipients has crossed the maximum limit (Maximum 10). * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks - * - Some service providers may not support sending MMS messages with an empty subject or body. @n - * In this case, the result of the status report will be the E_FAILURE exception. - * - The CC and BCC recipients in the @c recipientList are merged with the TO recipients when sending an MMS message. - * @see IMmsListener::OnMmsMessageSent() + * - Some service providers may not support sending MMS messages with an empty subject or body. @n + * In this case, the result of the status report is the @c E_FAILURE exception. + * - The CC and BCC recipients in the @c recipientList are merged with the TO recipients when sending an MMS message. + * @see IMmsListener::OnMmsMessageSent() */ result Send(const MmsMessage& message, const RecipientList& recipientList, bool saveToSentbox); diff --git a/inc/FMsgMmsMessage.h b/inc/FMsgMmsMessage.h index df11c9c..7e94fa0 100755 --- a/inc/FMsgMmsMessage.h +++ b/inc/FMsgMmsMessage.h @@ -33,13 +33,13 @@ namespace Tizen { namespace Messaging // forward declaration class _MmsMessageImpl; - /** + /** * @class MmsMessage * @brief This class provides methods for handling an MMS message. * * @since 2.0 * - * The %MmsMessage class provides methods for handling MMS messages. It allows you to set + * The %MmsMessage class provides methods for handling MMS messages. It allows the user to set * the subject and body text of an MMS message, and add or remove the files sent as MMS attachments. * * For more information on the class features, see Messaging Guide. @@ -49,31 +49,31 @@ namespace Tizen { namespace Messaging { // Life cycle public: - /** + /** * This is the default constructor for this class. * * @since 2.0 */ MmsMessage(void); - /** + /** * This is the destructor for this class. * * @since 2.0 */ virtual ~MmsMessage(void); - /** + /** * This is the copy constructor for the %MmsMessage class. * * @since 2.0 * - * @param[in] value An instance of %MmsMessage + * @param[in] value An instance of %MmsMessage to copy */ MmsMessage(const MmsMessage& value); - /** - * This assignment operator copies an MMS message from the specified instance of %MmsMessage to the calling instance of %MmsMessage. + /** + * This assignment operator copies the MMS message from the specified instance of %MmsMessage to the current instance of %MmsMessage. * * @since 2.0 * @@ -82,63 +82,65 @@ namespace Tizen { namespace Messaging */ MmsMessage& operator =(const MmsMessage& rhs); - /** - * Compares the calling instance with the specified instance. + /** + * Compares the specified instance with the current instance. * * @since 2.0 * - * @return @c true if the specified instance of Tizen::Base::Object is equal to the calling %MmsMessage instance, @n - * else @c false - * @param[in] obj The object to compare + * @return @c true if the specified instance of Tizen::Base::Object is equal to the current %MmsMessage instance, @n + * else @c false + * @param[in] obj The object to compare */ virtual bool Equals(const Tizen::Base::Object& obj) const; - /** + /** * Gets the hash value of the current instance. * * @since 2.0 * - * @return The hash value of the current instance + * @return The hash value of the current instance */ virtual int GetHashCode(void) const; // Operation public: - /** - * Sets the subject of the MMS message. + /** + * Sets the subject of an MMS message. * * @since 2.0 * * @return An error code * @param[in] subject The subject of the MMS message * @exception E_SUCCESS The method is successful. - * @exception E_MAX_EXCEEDED The subject length of the message exceeds the maximum limit (Maximum 40 characters). @n - * The total size of the subject, body, and attachment(s) exceeds the maximum limit (295KB). + * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: + * - The subject length of the message exceeds the maximum limit (Maximum 40 characters). + * - The total size of the subject, body, and attachment(s) exceeds the maximum limit (295KB). * @see GetSubject() */ result SetSubject(const Tizen::Base::String& subject); - /** - * Sets the body of the MMS message. + /** + * Sets the body of an MMS message. * * @since 2.0 * * @return An error code * @param[in] text The body of the MMS message * @exception E_SUCCESS The method is successful. - * @exception E_MAX_EXCEEDED The body length of the message exceeds the maximum limit (Maximum 1000 characters). @n - * The total size of the subject, body, and attachment(s) exceeds the maximum limit (295KB). + * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: + * - The body length of the message exceeds the maximum limit (Maximum 1000 characters). + * - The total size of the subject, body, and attachment(s) exceeds the maximum limit (295KB). * @see GetText() */ result SetText(const Tizen::Base::String& text); - /** - * Adds the attachment of the specific type. + /** + * Adds the attachment of the specified type. * * @if OSPCOMPAT - * @brief [Compatibility] + * @brief [Compatibility] * @endif - * @since 2.0 + * @since 2.0 * @if OSPCOMPAT * @compatibility This method has compatibility issues with OSP compatible applications. @n * For more information, see @ref CompIoPathPage "here". @@ -149,22 +151,24 @@ namespace Tizen { namespace Messaging * @param[in] filePath The path of the file to attach * @exception E_SUCCESS The method is successful. * @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed. - * @exception E_INVALID_ARG Either of the following conditions has occurred: @n - * - The length of the specified @c filePath is too long or @c 0. @n - * - The specified file format is already attached. @n - * - The specified @c format is invalid. @n - * - The specified file contains invalid or the media is not supported. @n - * - The specified file format cannot be attached. @n - * (An MMS attachment may contain either an image, audio, video, vCard, or a vCalendar file or a combination of an image, audio, vCard, and vCalendar file. @n - * MMS attachments cannot contain a video file in combination with an image or audio file.) - * @exception E_MAX_EXCEEDED The size of the file exceeds the maximum limit (Maximum 295KB). @n - * The total size of the subject, body, and attachment(s) exceeds the maximum limit (295KB). + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The length of the specified @c filePath is either too long or @c 0. + * - The specified file format is already attached. + * - The specified @c format is invalid. + * - The specified file contains invalid data. + * - The media is not supported. + * - The specified file format cannot be attached. + * (An MMS attachment may contain either an image, audio, video, vCard, or a vCalendar file or a combination of an image, audio, vCard, and vCalendar file. @n + * MMS attachments cannot contain a video file in combination with an image or audio file.) + * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: + * - The size of the file exceeds the maximum limit (Maximum 295KB). + * - The total size of the subject, body, and attachment(s) exceeds the maximum limit (295KB). * @see GetAttachment() */ result AddAttachment(MmsAttachmentFormat format, const Tizen::Base::String& filePath); - /** - * Gets the subject of the MMS message. + /** + * Gets the subject of an MMS message. * * @since 2.0 * @@ -173,8 +177,8 @@ namespace Tizen { namespace Messaging */ Tizen::Base::String GetSubject(void) const; - /** - * Gets the body of the MMS message. + /** + * Gets the body of an MMS message. * * @since 2.0 * @@ -183,33 +187,33 @@ namespace Tizen { namespace Messaging */ Tizen::Base::String GetText(void) const; - /** - * Gets the attachment file of the specific type. + /** + * Gets the attachment file of the specified type. * * @since 2.0 * - * @return The path of the attached file + * @return The path of the attached file * @param[in] format The format of the attachment * @exception E_SUCCESS The method is successful. * @exception E_INVALID_CONDITION The file is not attached. * @exception E_INVALID_ARG The specified @c format is invalid. * @remarks The specific error code can be accessed using the GetLastResult() method. - * @see AddAttachment() + * @see AddAttachment() */ Tizen::Base::String GetAttachment(MmsAttachmentFormat format) const; - /** - * Removes the attachment of the specific type. + /** + * Removes the attachment of the specified type. * * @since 2.0 * * @return An error code * @param[in] format The format of the attachment to remove * @exception E_SUCCESS The method is successful. - * @exception E_FILE_NOT_FOUND The corresponding format file is not found. + * @exception E_FILE_NOT_FOUND The file with the corresponding format is not found. * @exception E_INVALID_ARG The specified @c format is invalid. - * @see AddAttachment() - * @see GetAttachment() + * @see AddAttachment() + * @see GetAttachment() */ result RemoveAttachment(MmsAttachmentFormat format); diff --git a/inc/FMsgPushManager.h b/inc/FMsgPushManager.h index f480c73..5b405d0 100755 --- a/inc/FMsgPushManager.h +++ b/inc/FMsgPushManager.h @@ -33,26 +33,26 @@ namespace Tizen { namespace Messaging class _PushManagerImpl; /** -* @class PushManager -* @brief This class provides methods to use the push messaging service. -* -* @since 2.0 -* -* @remarks If an application package contains multiple applications, only one application can use the push messaging service at a time. -* -* @pre In order to use the push messaging service, see Push Messaging Guide. -* -* -* The %PushManager class provides methods to register, unregister, and use the push messaging service. -* -* For more information on the class features, see Messaging Guide. -* -* @see Tizen::Shell::NotificationManager -* -* The following example demonstrates how to use the %PushManager class. -* -* @code -* + * @class PushManager + * @brief This class provides methods to use the push messaging service. + * + * @since 2.0 + * + * @remarks If an application package contains multiple applications, only one application can use the push messaging service at a time. + * + * @pre For information on how to use the push messaging service, see Push Messaging Guide. + * + * + * The %PushManager class provides methods to register, unregister, and use the push messaging service. + * + * For more information on the class features, see Messaging Guide. + * + * @see Tizen::Shell::NotificationManager + * + * The following example demonstrates how to use the %PushManager class. + * + * @code + * #include #include @@ -154,49 +154,48 @@ class _OSP_EXPORT_ PushManager : public Tizen::Base::Object { public: - /** - * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor. - * - * @since 2.0 - */ + /** + * The object is not fully constructed after this constructor is called. @n + * For full construction, the Construct() method must be called right after calling this constructor. + * + * @since 2.0 + */ PushManager(void); - /** - * This destructor overrides Tizen::Base::Object::~Object(). - * - * @since 2.0 - */ + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ virtual ~PushManager(void); public: - /** - * Initializes this instance of the %PushManager class with the specified parameters. + /** + * Initializes this instance of %PushManager with the specified parameters. * * @since 2.0 * @privlevel public * @privilege %http://tizen.org/privilege/push * - * @pre In order to use the push messaging service, see Push Messaging Guide. + * @pre For information on how to use the push messaging service, see Push Messaging Guide. * @feature %http://tizen.org/feature/network.push * @return An error code - * @param[in] managerListener A listener that receives the result of the %PushManager - * class asynchronous methods - * @param[in] eventListener A listener that receives the incoming push messages - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @param[in] managerListener The listener to receive the result of the %PushManager + * class asynchronous methods + * @param[in] eventListener The listener to receive the incoming push messages + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 - * For more information, see Application Filtering. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 - * @remarks Before calling this method, check whether the feature is supported by - * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). - * @see IPushManagerListener - * @see IPushEventListener + * For more information, see Application Filtering. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 + * @remarks Before calling this method, check whether the feature is supported by + * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). */ result Construct(IPushManagerListener& managerListener, IPushEventListener& eventListener); - /** + /** * Registers the push messaging service for the current application. @n * The %RegisterPushService() method is asynchronous. * @@ -204,20 +203,20 @@ public: * @privlevel public * @privilege %http://tizen.org/privilege/push * - * @pre In order to use the push messaging service, see Push Messaging Guide. + * @pre For information on how to use the push messaging service, see Push Messaging Guide. * * @return An error code - * @param[out] reqId The request ID - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @param[out] reqId The request ID + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @see IPushManagerListener::OnPushServiceRegistered() */ result RegisterPushService(RequestId& reqId); - /** + /** * Unregisters the push messaging service for the current application. @n * The %UnregisterPushService() method is asynchronous. * @@ -225,32 +224,32 @@ public: * @privlevel public * @privilege %http://tizen.org/privilege/push * - * @pre In order to use the push messaging service, see Push Messaging Guide. + * @pre For information on how to use the push messaging service, see Push Messaging Guide. * * @return An error code - * @param[out] reqId The request ID - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @param[out] reqId The request ID + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @see IPushManagerListener::OnPushServiceUnregistered() */ result UnregisterPushService(RequestId& reqId); - /** - * Checks whether the push messaging service registration has been completed for the current application. + /** + * Checks whether the push messaging service is registered for the current application. * * @since 2.0 * - * @pre In order to use the push messaging service, see Push Messaging Guide. + * @pre For information on how to use the push messaging service, see Push Messaging Guide. * * @return @c true if the registration is completed, @n * else @c false */ bool IsPushServiceRegistered(void) const; - /** + /** * Gets the unread push messages. @n * If an application receives unread messages with the %GetUnreadMessagesN() method, the messages are removed from the system. * @@ -258,84 +257,81 @@ public: * @privlevel public * @privilege %http://tizen.org/privilege/push * - * @pre In order to use the push messaging service, see Push Messaging Guide. + * @pre For information on how to use the push messaging service, see Push Messaging Guide. * * @return A pointer to the list that contains unread push messages - * @exception E_SUCCESS The method is successful. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks * - The specific error code can be accessed using the GetLastResult() method. - * - If the user launches the application using a ticker or a quick panel, - * the push message related to the notification is delivered to the application - * as a launch argument. - * - The launch arguments are the input parameters for - * Tizen::App::IAppControlProviderEventListener::OnAppControlRequestReceivedN(). - * - This method returns all the unread messages including the message - * delivered as a launch argument. - * @see Tizen::App::IAppControlProviderEventListener + * - If the user launches the application using a ticker or a quick panel, the push message related to the + * notification is delivered to the application as a launch argument. + * - The launch arguments are the input parameters for Tizen::App::IAppControlProviderEventListener::OnAppControlRequestReceivedN(). + * - This method returns all the unread messages including the message delivered as a launch argument. + * @see Tizen::App::IAppControlProviderEventListener */ Tizen::Base::Collection::IList* GetUnreadMessagesN(void); - /** - * Sends the push message to a single recipient. @n + /** + * Sends the specified push message to a single recipient. @n * The %SendPushMessage() method is asynchronous. * * @since 2.0 * @privlevel public * @privilege %http://tizen.org/privilege/push and %http://tizen.org/privilege/http @n - * Both privileges are required. + * Both the privileges are required. * - * @pre In order to use the push messaging service, see Push Messaging Guide. + * @pre For information on how to use the push messaging service, see Push Messaging Guide. * * @return An error code - * @param[in] message The push message - * @param[in] registrationId The registration ID of the recipient - * @param[in] appSecret The secret code of the application issued by the push server to authenticate the application - * @param[out] reqId The request ID - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 - * @see IPushManagerListener::OnPushMessageSent() + * @param[in] message The push message + * @param[in] registrationId The registration ID of the recipient + * @param[in] appSecret The secret code of the application issued by the push server to authenticate the application + * @param[out] reqId The request ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 + * @see IPushManagerListener::OnPushMessageSent() */ result SendPushMessage(const PushMessage& message, const Tizen::Base::String& registrationId, const Tizen::Base::String& appSecret, RequestId& reqId); - /** - * Sends the push message to multiple recipients. @n + /** + * Sends the specified push message to multiple recipients. @n * The %SendPushMessage() method is asynchronous. * * @since 2.0 * @privlevel public * @privilege %http://tizen.org/privilege/push and %http://tizen.org/privilege/http @n - * Both privileges are required. + * Both the privileges are required. * - * @pre In order to use the push messaging service, see Push Messaging Guide. + * @pre For information on how to use the push messaging service, see Push Messaging Guide. * * @return An error code - * @param[in] message The push message - * @param[in] registrationIdList The list of registration IDs of the recipients - * @param[in] appSecret The secret code of the application issued by the push server to authenticate the application - * @param[out] reqId The request ID - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG A specified input parameter is invalid. - * @exception E_MAX_EXCEEDED The number of registration IDs has crossed the maximum limit. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 - * @remarks The maximum limit can be checked by using GetMaxRecipientCount(). - * @see IPushManagerListener::OnPushMessageSent() + * @param[in] message The push message + * @param[in] registrationIdList The list of registration IDs of the recipients + * @param[in] appSecret The secret code of the application issued by the push server to authenticate the application + * @param[out] reqId The request ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_MAX_EXCEEDED The number of registration IDs has crossed the maximum limit. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 + * @remarks The maximum limit can be checked by using GetMaxRecipientCount(). + * @see IPushManagerListener::OnPushMessageSent() */ result SendPushMessage(const PushMessage& message, const Tizen::Base::Collection::IList& registrationIdList, const Tizen::Base::String& appSecret, RequestId& reqId); /** - * Gets the maximum number of recipients sent by a multiple SendPushMessage() method. + * Gets the maximum number of recipients for push messages sent by the multiple SendPushMessage() method. * * @since 2.0 * diff --git a/inc/FMsgPushMessage.h b/inc/FMsgPushMessage.h index 0d92094..b996848 100755 --- a/inc/FMsgPushMessage.h +++ b/inc/FMsgPushMessage.h @@ -33,37 +33,37 @@ namespace Tizen { namespace Messaging class _PushMessageImpl; /** -* @class PushMessage -* @brief This class provides methods for handling a push message. -* -* @since 2.0 -* -* The %PushMessage class provides methods for handling a push message. It allows you to get the body text and -* the received time of a push message. -* -* For more information on the class features, see Messaging Guide. -*/ + * @class PushMessage + * @brief This class provides methods for handling a push message. + * + * @since 2.0 + * + * The %PushMessage class provides methods for handling a push message. It allows the user to get the body text and + * the received time of a push message. + * + * For more information on the class features, see Messaging Guide. + */ class _OSP_EXPORT_ PushMessage : public Tizen::Base::Object { public: - /** + /** * This is the default constructor for this class. * * @since 2.0 */ PushMessage(void); - /** - * This destructor overrides Tizen::Base::Object::~Object(). - * - * @since 2.0 - */ + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ virtual ~PushMessage(void); public: - /** - * Gets the date and time (UTC time) of the message when it is received. + /** + * Gets the date and time (UTC time) of a message when it is received. * * @since 2.0 * @@ -71,9 +71,9 @@ public: */ Tizen::Base::DateTime GetReceivedTime(void) const; - /** + /** * @if OSPDEPREC - * Gets the body of the message. + * Gets the body of a message. * * @brief [Deprecated] * @deprecated This method is deprecated. Instead of using this method, use the Tizen::Shell::NotificationRequest::GetAppMessage() method. @@ -85,29 +85,29 @@ public: */ Tizen::Base::String GetText(void) const; - /** - * Sets an action of the push message. + /** + * Sets the specified action of a push message. * * @since 2.0 * * @return An error code - * @param[in] action An action of the push message + * @param[in] action The action of the push message * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. */ result SetAction(PushAction action); - /** - * Gets an action of the push message. + /** + * Gets the action of the push message. * * @since 2.0 * - * @return An action of the push message + * @return The action of the push message */ PushAction GetAction(void) const; - /** - * Sets the notification of the push message. + /** + * Sets the specified notification of a push message. * * @since 2.0 * @@ -116,54 +116,52 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The specified input parameter is invalid. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @remarks PushMessage supports to set only alert text of NotificationRequest instance, and others are ignored. - * @see Tizen::Shell::NotificationRequest + * @remarks PushMessage only supports setting the alert text of the NotificationRequest instance, and ignores others. */ result SetNotification(const Tizen::Shell::NotificationRequest& notificationRequest); - /** + /** * Gets the notification of the push message. * * @since 2.0 * * @return The notification request - * @remarks PushMessage supports to get only alert text of NotificationRequest instance, and others are ignored. - * @see Tizen::Shell::NotificationRequest + * @remarks PushMessage only supports getting the alert text of the NotificationRequest instance, and ignores others. */ Tizen::Shell::NotificationRequest GetNotification(void) const; - /** + /** * Copying of objects using this copy constructor is allowed. * * @since 2.0 * - * @param[in] rhs An instance of %PushMessage + * @param[in] rhs An instance of %PushMessage to copy */ PushMessage(const PushMessage& rhs); - /** + /** * Copying of objects using this copy assignment operator is allowed. * * @since 2.0 * * @return A reference to this instance - * @param[in] rhs An instance of %PushMessage + * @param[in] rhs An instance of %PushMessage to copy */ PushMessage& operator =(const PushMessage& rhs); - /** - * Compares the specified instance of %PushMessage with the calling instance. + /** + * Compares the specified instance with the current instance. * * @since 2.0 * - * @return @c true if the values match, @n + * @return @c true if the specified instance of Tizen::Base::Object is equal to the current %PushMessage instance, @n * else @c false * @param[in] obj The other Tizen::Base::Object to compare * @see Tizen::Base::Object::Equals() */ virtual bool Equals(const Tizen::Base::Object& obj) const; - /** + /** * Gets the hash value of the current instance. * * @since 2.0 diff --git a/inc/FMsgRecipientList.h b/inc/FMsgRecipientList.h index f8e0df1..ccad970 100755 --- a/inc/FMsgRecipientList.h +++ b/inc/FMsgRecipientList.h @@ -33,41 +33,41 @@ namespace Tizen { namespace Messaging // forward declaration class _RecipientListImpl; - /** + /** * @class RecipientList * @brief This class provides the abstract data type and methods for handling recipients. * * @since 2.0 * - * The %RecipientList class provides methods for handling message recipients. It allows you to add, remove, set, - * and get the list of recipients. A recipient is an email address for an email message and a telephone number - * for an SMS or MMS message. + * The %RecipientList class provides methods for handling message recipients. It allows the user to add, remove, set, + * and get the list of recipients. A recipient is an email address for an email message or a telephone number + * for an SMS or MMS message. * * For more information on the class features, see Messaging Guide. - + * */ class _OSP_EXPORT_ RecipientList : public Tizen::Base::Object { // Life cycle public: - /** + /** * This is the default constructor for this class. * * @since 2.0 */ RecipientList(void); - /** + /** * This is the copy constructor for the %RecipientList class. * * @since 2.0 * - * @param[in] value An instance of %RecipientList + * @param[in] value An instance of %RecipientList to copy */ RecipientList(const RecipientList& value); - /** + /** * This is the destructor for this class. * * @since 2.0 @@ -76,143 +76,142 @@ namespace Tizen { namespace Messaging //Operator public: - /** + /** * This is the assignment operator for this class. @n - * Copies the recipient list from the specified instance of %RecipientList to the calling instance of %RecipientList. + * Copies the recipient list from the specified instance of %RecipientList to the current instance of %RecipientList. * * @since 2.0 * - * @param[in] rhs A reference to the %RecipientList instance + * @param[in] rhs A reference to the %RecipientList instance to copy */ RecipientList& operator =(const RecipientList& rhs); - /** + /** * This operator compares the two recipient lists. * * @since 2.0 * - * @return @c true if both instances are equal, @n - * else @c false + * @return @c true if both the instances are equal, @n + * else @c false * @param[in] rhs A reference to the %RecipientList instance on the right-hand side of the operator */ bool operator ==(const RecipientList& rhs) const; - /** - * This operator compares the specified instance with the calling instance for inequality. + /** + * This operator compares the specified instance with the current instance for inequality. * * @since 2.0 * - * @return @c true if both instances are not equal, @n - * else @c false - * @param[in] rhs A reference to the %RecipientList instance on the right-hand side of the operator + * @return @c true if both the instances are not equal, @n + * else @c false + * @param[in] rhs A reference to the %RecipientList instance on the right-hand side of the operator */ bool operator !=(const RecipientList& rhs) const; - /** + /** * Gets the hash value of the current instance. * * @since 2.0 * * @return The hash value of the current instance * @remarks - * - Two equal instances should return the same hash value. - * - For better performance, the used hash function must generate a random distribution for all inputs. + * - Two equal instances should return the same hash value. + * - For better performance, the hash function must generate a random distribution for all the inputs. */ virtual int GetHashCode(void) const; // Operation public: - /** - * Compares the specified instance with the calling instance. + /** + * Compares the specified instance with the current instance. * * @since 2.0 * - * @return @c true if both instances are equal, @n + * @return @c true if the specified instance of Tizen::Base::Object is equal to the current %RecipientList instance, @n * else @c false * @param[in] value An instance of %RecipientList */ virtual bool Equals(const Tizen::Base::Object& value) const; - /** - * Adds a recipient string. + /** + * Adds the specified recipient string. * * @since 2.0 * * @return An error code - * @param[in] type The type of recipient + * @param[in] type The recipient type * @param[in] recipient The recipient string * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_OBJ_ALREADY_EXIST The specified @c recipient is already added. - * @exception E_INVALID_ARG The specified @c recipient string length is too short (< 3) or too long (> 320), or - * the specified @c type is invalid. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c recipient string length is too short (< 3) or too long (> 320). + * - The specified @c type is invalid. * @remarks - * - The limit of the number of recipients is not checked in this method. This is done in the SmsManager::Send(), - * MmsManager::Send(), and EmailManager::Send() methods. - * - The minimum length of a recipient is @c 3 for a phone number and @c 5 for an email address. - * - The maximum length of a recipient is @c 41 for a phone number and @c 320 for an email address. - * @see Set() - * @see GetListN() - * @see SmsManager::Send() - * @see MmsManager::Send() - * @see EmailManager::Send() + * - The limit of the number of recipients is not checked in this method. This is done in the SmsManager::Send(), + * MmsManager::Send(), and EmailManager::Send() methods. + * - The minimum length of a recipient is @c 3 for a phone number and @c 5 for an email address. + * - The maximum length of a recipient is @c 41 for a phone number and @c 320 for an email address. + * @see Set() + * @see GetListN() */ result Add(RecipientType type, const Tizen::Base::String& recipient); - /** - * Removes the recipient. + /** + * Removes the specified recipient. * * @since 2.0 * - * @return An error code - * @param[in] type The type of recipient + * @return An error code + * @param[in] type The recipient type * @param[in] recipient The recipient string * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c recipient string length is too short (< 3) or too long (> 320), or - * the specified @c type is invalid. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c recipient string length is too short (< 3) or too long (> 320). + * - The specified @c type is invalid. * @exception E_OBJ_NOT_FOUND The specified @c recipient does not exist. * @see Add() */ result Remove(RecipientType type, const Tizen::Base::String& recipient); - /** - * Sets a recipient list. + /** + * Sets the specified recipient list. * * @since 2.0 * - * @return An error code - * @param[in] type The type of recipient - * @param[in] list A list of recipient strings + * @return An error code + * @param[in] type The recipient type + * @param[in] list The list of recipient strings * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The length of one of the recipients in the list is too short (< 3) or too long (> 320), or - * the specified @c type is invalid. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The length of one of the recipients in the list is too short (< 3) or too long (> 320). + * - The specified @c type is invalid. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_OBJ_ALREADY_EXIST A duplicate recipient in the recipient list already exists. - * @remarks - * - The limit of recipients is not checked in this method. - * - This is done in the SmsManager::Send(), MmsManager::Send(), and EmailManager::Send() methods. + * @exception E_OBJ_ALREADY_EXIST A duplicate recipient exists in the recipient list. + * @remarks The limit of the recipients is not checked in this method. + * This is done in the SmsManager::Send(), MmsManager::Send(), and EmailManager::Send() methods. * @see Add() * @see GetListN() */ result Set(RecipientType type, const Tizen::Base::Collection::IList& list); - /** - * Gets the recipient list of the specific recipient type. + /** + * Gets the recipient list of the specified recipient type. * * @since 2.0 * - * @return A pointer to the list of recipient type - * @param[in] type The type of recipient + * @return A pointer to the list of recipient type + * @param[in] type The recipient type * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_INVALID_ARG The specified @c type is invalid. * @remarks - * - The recipient is an email address for an email message or a telephone number for an SMS or MMS message. - * - The specified @c type contains @c RECIPIENT_TYPE_TO, @c RECIPIENT_TYPE_CC, @c RECIPIENT_TYPE_BCC. @n - * - The specific error code can be accessed using the GetLastResult() method. - * @see Add() - * @see Set() + * - The recipient is an email address for an email message or a telephone number for an SMS or MMS message. + * - The specified @c type contains @c RECIPIENT_TYPE_TO, @c RECIPIENT_TYPE_CC or @c RECIPIENT_TYPE_BCC. + * - The specific error code can be accessed using the GetLastResult() method. + * @see Add() + * @see Set() */ Tizen::Base::Collection::IList* GetListN(RecipientType type) const; diff --git a/inc/FMsgSmsManager.h b/inc/FMsgSmsManager.h index 2b4cc47..877a5fd 100755 --- a/inc/FMsgSmsManager.h +++ b/inc/FMsgSmsManager.h @@ -15,7 +15,7 @@ // limitations under the License. // /** - * @file FMsgSmsManager.h + * @file FMsgSmsManager.h * @brief This is the header file for the %SmsManager class. * * This header file contains the declarations of the %SmsManager class. @@ -41,11 +41,11 @@ namespace Tizen { namespace Messaging // forward declaration class _SmsManagerImpl; - /** + /** * @class SmsManager - * @brief This class provides methods to use the SMS messaging service. + * @brief This class provides methods to use the Short Message Service. * - * @since 2.0 + * @since 2.0 * * The %SmsManager class is used to send, receive, and retrieve SMS messages. * @@ -112,14 +112,14 @@ namespace Tizen { namespace Messaging { // Life cycle public: - /** + /** * This is the default constructor for this class. * * @since 2.0 */ SmsManager(void); - /** + /** * This is the destructor for this class. * * @since 2.0 @@ -133,14 +133,14 @@ namespace Tizen { namespace Messaging // Operation public: - /** + /** * Initializes this instance of %SmsManager with the specified parameter. * * @since 2.0 * * @feature %http://tizen.org/feature/network.telephony * @return An error code - * @param[in] listener The listener to receive a send result asynchronously + * @param[in] listener The listener to receive a sent result asynchronously * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @@ -150,53 +150,52 @@ namespace Tizen { namespace Messaging */ result Construct(ISmsListener& listener); - /** - * Adds the event listener for receiving SMS messages. + /** + * Adds the specified event listener for receiving SMS messages. * * @since 2.0 * @privlevel partner * @privilege %http://tizen.org/privilege/smstrigger * * @return An error code - * @param[in] port A port number + * @param[in] port The port number * @param[in] eventListener The listener to receive SMS messages * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_OBJ_ALREADY_EXIST The specified port number is already registered. @n - * The listener is already exists. + * @exception E_OBJ_ALREADY_EXIST Either of the following conditions has occurred: + * - The specified port number is already registered. + * - The listener already exists. * @exception E_FAILURE The specified port number is already used in other applications. * @exception E_INVALID_ARG The specified @c port is invalid. @n - * The port number must range from @c 1 to @c 9999 (1 <= port <= 9999). + * The port number ranges from @c 1 to @c 9999 (1 <= port <= 9999). * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @see ISmsEventListener - * @see RemoveSmsEventListener() + * @see RemoveSmsEventListener() */ result AddSmsEventListener(int port, ISmsEventListener& eventListener); - /** - * Removes the event listener for receiving SMS messages. + /** + * Removes the specified event listener for receiving SMS messages. * * @since 2.0 * @privlevel partner * @privilege %http://tizen.org/privilege/smstrigger * * @return An error code - * @param[in] port A port number + * @param[in] port The port number * @param[in] eventListener The listener to receive SMS messages * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_OBJ_NOT_FOUND The listener is not found. * @exception E_SYSTEM A system error has occurred. * @exception E_INVALID_ARG The specified @c port is invalid. @n - * The port number must range from @c 1 to @c 9999 (1 <= port <= 9999). + * The port number ranges from @c 1 to @c 9999 (1 <= port <= 9999). * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @see ISmsEventListener - * @see AddSmsEventListener() + * @see AddSmsEventListener() */ result RemoveSmsEventListener(int port, ISmsEventListener& eventListener); - /** - * Adds the event listener for receiving SMS messages. + /** + * Adds the specified event listener for receiving SMS messages. * * @since 2.0 * @privlevel public @@ -209,14 +208,13 @@ namespace Tizen { namespace Messaging * @exception E_OUT_OF_MEMORY The memory is insufficient. * @exception E_OBJ_ALREADY_EXIST The listener already exists. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 - * @see ISmsMessageEventListener - * @see RemoveSmsMessageEventListener() + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 + * @see RemoveSmsMessageEventListener() */ result AddSmsMessageEventListener(ISmsMessageEventListener& eventListener); - /** - * Removes the event listener for receiving SMS messages. + /** + * Removes the specified event listener for receiving SMS messages. * * @since 2.0 * @privlevel public @@ -230,14 +228,13 @@ namespace Tizen { namespace Messaging * @exception E_OBJ_NOT_FOUND The listener is not found. * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 - * @see ISmsMessageEventListener - * @see AddSmsMessageEventListener() + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 + * @see AddSmsMessageEventListener() */ result RemoveSmsMessageEventListener(ISmsMessageEventListener& eventListener); - /** - * Sends the SMS message. + /** + * Sends the specified SMS message. * * @since 2.0 * @privlevel public @@ -249,6 +246,7 @@ namespace Tizen { namespace Messaging * @param[in] saveToSentbox Set to @c true to save the message in the Sentbox, @n * else @c false * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM The method cannot proceed due to a severe system error. * @exception E_ON_INITIALIZING The mailbox is not completely loaded as yet. * @exception E_STORAGE_FULL The storage is full. * @exception E_DEVICE_UNAVAILABLE The device is unavailable. @@ -258,13 +256,13 @@ namespace Tizen { namespace Messaging * @exception E_INVALID_ARG The number of recipients is @c 0. * @exception E_MAX_EXCEEDED The number of recipients has crossed the maximum limit (Maximum 10). * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 - * @remarks The CC and BCC recipients in the @c recipientList are ignored when sending an SMS message. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 + * @remarks The CC and BCC recipients in the @c recipientList are ignored while sending an SMS message. * @see ISmsListener::OnSmsMessageSent() */ result Send(const SmsMessage& message, const RecipientList& recipientList, bool saveToSentbox); - /** + /** * Gets the total number of SMS messages in the specified message box. * * @since 2.0 @@ -273,56 +271,58 @@ namespace Tizen { namespace Messaging * (%http://tizen.org/privilege/messaging.sms is deprecated.) * * @return The total number of SMS messages in the specified message box - * @param[in] type The type of message box - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c type is invalid. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @param[in] type The message box type + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c type is invalid. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks - * - In case of an error, this method returns the negative value. For example, @c -1. + * - In case of an error, this method returns a negative value. For example, @c -1. * - The specific error code can be accessed using the GetLastResult() method. */ int GetTotalMessageCount(SmsMessageBoxType type) const; - /** - * Searches the SMS messages by keyword and|or sender address in the Inbox. + /** + * Searches the SMS messages by keyword and/or sender address in the Inbox. * * @since 2.0 * @privlevel public * @privilege %http://tizen.org/privilege/messaging.read @n * (%http://tizen.org/privilege/messaging.sms is deprecated.) * - * @return A pointer to the list of the SmsMessage class instances - * @param[in] pKeyword A part of the body text as a keyword (partial match) @n - * In case of @c null or an empty string, this method searches all SMS messages in the Inbox regardless of the keyword. + * @return A pointer to the list of SmsMessage instances + * @param[in] pKeyword A part of the body text as a keyword (partial match) @n + * In case of @c null or an empty string, this method searches all the SMS messages in the Inbox regardless of the keyword. * @param[in] pSenderAddress A telephone number as a sender address (exact match) @n - * In case of @c null or an empty string, this method searches all SMS messages in the Inbox regardless of the sender address. - * @param[in] startIndex The start index (base 0) + * In case of @c null or an empty string, this method searches all the SMS messages in the Inbox regardless of the sender address. + * @param[in] startIndex The starting index (base 0) * @param[in] count The count of SMS messages to search - * @param[out] totalResultCount The total count of the searched result + * @param[out] totalResultCount The total count of the searched result * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either of the following conditions has occurred: @n - * - The specified @c pKeyword string length is less than @c 2 or greater than @c 30. @n - * - The specified @c pSenderAddress string length is less than @c 3 or greater than @c 41. @n - * - The specified @c startIndex value is less than @c 0. @n - * - The specified @c count value is less than @c 0 or greater than @c 20. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c pKeyword string length is less than @c 2. + * - The specified @c pKeyword string length is greater than @c 30. + * - The specified @c pSenderAddress string length is less than @c 3. + * - The specified @c pSenderAddress string length is greater than @c 41. + * - The specified @c startIndex value is less than @c 0. + * - The specified @c count value is less than @c 0. + * - The specified @c count value is greater than @c 20. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks * - The specific error code can be accessed using the GetLastResult() method. - * - The search with the specified keywords searches using only the first 50 characters of the body text. + * - The search with the specified keywords uses only the first 50 characters of the body text. * - The SMS messages in the searched result contain only @c 160 bytes for the body text. - * - To check whether there is additional text, use the SmsMessage::HasMoreText() method. @n + * - To check whether there is additional text, use the SmsMessage::HasMoreText() method. * - To get the full body text, use GetFullText() with its message ID. - * @see SmsMessage - * @see GetFullText() + * @see GetFullText() */ Tizen::Base::Collection::IList* SearchInboxN(const Tizen::Base::String* pKeyword, const Tizen::Base::String* pSenderAddress, int startIndex, int count, int& totalResultCount) const; - /** + /** * Searches the SMS messages by keyword in the specified message box. * * @since 2.0 @@ -330,35 +330,36 @@ namespace Tizen { namespace Messaging * @privilege %http://tizen.org/privilege/messaging.read @n * (%http://tizen.org/privilege/messaging.sms is deprecated.) * - * @return A pointer to the list of the SmsMessage class instances - * @param[in] type The type of message box - * @param[in] pKeyword A part of the body text as a keyword (partial match) @n - * In case of @c null or an empty string, this method searches all SMS messages in the specified message box. - * @param[in] startIndex The start index (base 0) + * @return A pointer to the list of SmsMessage instances + * @param[in] type The type of message box + * @param[in] pKeyword A part of the body text as a keyword (partial match) @n + * In case of @c null or an empty string, this method searches all the SMS messages in the specified message box. + * @param[in] startIndex The start index (base 0) * @param[in] count The count of SMS messages to search - * @param[out] totalResultCount The total count of the searched result + * @param[out] totalResultCount The total count of the searched result * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either of the following conditions has occurred: @n - * - The specified @c type is invalid. @n - * - The specified @c pKeyword string length is less than @c 2 or greater than @c 30. @n - * - The specified @c startIndex value is less than @c 0. @n - * - The specified @c count value is less than @c 0 or greater than @c 20. - * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c type is invalid. + * - The specified @c pKeyword string length is less than @c 2. + * - The specified @c pKeyword string length is greater than @c 30. + * - The specified @c startIndex value is less than @c 0. + * - The specified @c count value is less than @c 0. + * - The specified @c count value is greater than @c 20. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks - * - The specific error code can be accessed using the GetLastResult() method. - * - The search with the specified keywords searches using only the first 50 characters of the body text. - * - The SMS messages in the searched result contain only @c 160 bytes for the body text. - * - To check whether there is additional text, use the SmsMessage::HasMoreText() method. - * - To get the full body text, use the GetFullText() method with its message ID. - * @see SmsMessage + * - The specific error code can be accessed using the GetLastResult() method. + * - The search with the specified keywords uses only the first 50 characters of the body text. + * - The SMS messages in the searched result contain only @c 160 bytes for the body text. + * - To check whether there is additional text, use the SmsMessage::HasMoreText() method. + * - To get the full body text, use the GetFullText() method with the message ID. * @see GetFullText() */ Tizen::Base::Collection::IList* SearchMessageBoxN(SmsMessageBoxType type, const Tizen::Base::String* pKeyword, int startIndex, int count, int& totalResultCount) const; - /** + /** * Gets the full text of the SMS message in the message box using the message ID. * * @since 2.0 @@ -366,22 +367,24 @@ namespace Tizen { namespace Messaging * @privilege %http://tizen.org/privilege/messaging.read @n * (%http://tizen.org/privilege/messaging.sms is deprecated.) * - * @return The full text of the specified SMS message @n - * The value is an empty string in case of an error. - * @param[in] messageId The unique ID of the message - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c messageId is invalid, or it must be greater than or equal to @c 0. - * @exception E_OBJ_NOT_FOUND The SMS message with the specified @c messageId is not found. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @return The full text of the specified SMS message, @n + * else an empty string if an error occurs + * @param[in] messageId The unique ID of the message + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c messageId is invalid. + * - The specified @c messageId is greater than or equal to @c 0. + * @exception E_OBJ_NOT_FOUND The SMS message with the specified @c messageId is not found. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 + * @remarks The specific error code can be accessed using the GetLastResult() method. * @see SmsMessage::HasMoreText() */ Tizen::Base::String GetFullText(int messageId) const; - /** - * Sets the event listener for receiving CB messages. + /** + * Sets the specified event listener for receiving CB messages. * * @since 2.0 * @privlevel platform @@ -395,14 +398,13 @@ namespace Tizen { namespace Messaging * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. - * @remarks Before calling this method, check whether the feature is supported by + * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). - * @see ICbsMessageEventListener */ result SetCbsMessageEventListener(ICbsMessageEventListener* pListener); - /** - * Sets the event listener for receiving ETWS primary notification. + /** + * Sets the specified event listener for receiving ETWS primary notifications. * * @since 2.0 * @privlevel platform @@ -410,20 +412,19 @@ namespace Tizen { namespace Messaging * * @feature %http://tizen.org/feature/network.telephony.sms.cbs * @return An error code - * @param[in] pListener The listener to receive ETWS primary notification - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @param[in] pListener The listener to receive ETWS primary notifications + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. - * @remarks Before calling this method, check whether the feature is supported by + * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). - * @see IEtwsPrimaryNotificationEventListener */ result SetEtwsPrimaryNotificationEventListener(IEtwsPrimaryNotificationEventListener* pListener); - /** - * Enables or disables the save option for CBS message to the CbsBox. + /** + * Enables or disables the save option for a CBS message to the CbsBox. * * @since 2.0 * @privlevel platform @@ -431,19 +432,19 @@ namespace Tizen { namespace Messaging * * @feature %http://tizen.org/feature/network.telephony.sms.cbs * @return An error code - * @param[in] enable Set to @c true to save the message in the CbsBox, @n - * else @c false - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @param[in] enable Set to @c true to save the message in the CbsBox, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. - * @remarks Before calling this method, check whether the feature is supported by + * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). */ result SetSavingToCbsBoxEnabled(bool enable); - /** + /** * Checks whether the CB service is enabled. * * @since 2.0 @@ -456,7 +457,7 @@ namespace Tizen { namespace Messaging */ bool IsCbsEnabled(void) const; - /** + /** * Enables or disables the CB service. * * @since 2.0 @@ -472,14 +473,14 @@ namespace Tizen { namespace Messaging * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. - * @remarks Before calling this method, check whether the feature is supported by + * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). * @see IsCbsEnabled() */ result SetCbsEnabled(bool enable); - /** - * Adds a CBS channel with specified parameters. + /** + * Adds the CBS channel with the specified parameters. * * @since 2.0 * @privlevel platform @@ -489,30 +490,31 @@ namespace Tizen { namespace Messaging * @return An error code * @param[in] from The starting index of the message ID of the channel * @param[in] to The last index of the message ID of the channel - * @param[in] name The name of the channel. (can be an empty string) + * @param[in] name The name of the channel. @n + * This can be an empty string. * @param[in] activate Set to @c true to activate the channel, @n * else @c false. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either of the following conditions has occurred: @n - * - The specified @c to parameter is smaller than @c from. @n - * - The specified @c to or @c from parameter is a negative value. @n - * - The specified @c to parameter exceeds the limit (0xFFFF). @n - * - The range (@c to - @c from) exceeds the limit (0xFFFF). - * - The specified @c name string length is greater than @c 32. @n + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c to is smaller than @c from. + * - The specified @c to or @c from is negative. + * - The specified @c to exceeds the limit (0xFFFF). + * - The range (@c to - @c from) exceeds the limit (0xFFFF). + * - The specified @c name string length is greater than @c 32. * @exception E_ALREADY_SET The channel range (@c from ~ @c to) is already set. * @exception E_ILLEGAL_ACCESS The application does not have the permission to add the CBS channel. * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. - * @remarks Before calling this method, check whether the feature is supported by + * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). * @see RemoveCbsChannel() */ result AddCbsChannel(int from, int to, Tizen::Base::String& name, bool activate = true); - /** - * Removes a CBS channel. + /** + * Removes the CBS channel with the specified parameters. * * @since 2.0 * @privlevel platform @@ -523,54 +525,54 @@ namespace Tizen { namespace Messaging * @param[in] from The starting index of the message ID of the channel * @param[in] to The last index of the message ID of the channel * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either of the following conditions has occurred: @n - * - The specified @c to parameter is smaller than @c from. @n - * - The specified @c to or @c from parameter is a negative value. @n - * - The specified @c to parameter exceeds the limit (0xFFFF). @n - * - The range (@c to - @c from) exceeds the limit (0xFFFF). + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c to is smaller than @c from. + * - The specified @c to or @c from is negative. + * - The specified @c to exceeds the limit (0xFFFF). + * - The range (@c to - @c from) exceeds the limit (0xFFFF). * @exception E_OBJ_NOT_FOUND The channel range (@c from ~ @c to) is not found. * @exception E_ILLEGAL_ACCESS The application does not have the permission to remove the CBS channel. * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. - * @remarks Before calling this method, check whether the feature is supported by + * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). * @see AddCbsChannel() */ result RemoveCbsChannel(int from, int to); - /** - * Gets a CBS channel with specified range. + /** + * Gets the CBS channel with the specified range. * * @since 2.0 * @privlevel platform * @privilege %http://tizen.org/privilege/cellbroadcast * * @feature %http://tizen.org/feature/network.telephony.sms.cbs - * @return A pointer to the CBS channel with specific range. + * @return A pointer to the CBS channel with the specified range * @param[in] from The starting index of the message ID of the channel * @param[in] to The last index of the message ID of the channel * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either of the following conditions has occurred: @n - * - The specified @c to parameter is smaller than @c from. @n - * - The specified @c to or @c from parameter is a negative value. @n - * - The specified @c to parameter exceeds the limit (0xFFFF). @n - * - The range (@c to - @c from) exceeds the limit (0xFFFF). + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c to is smaller than @c from. + * - The specified @c to or @c from is negative. + * - The specified @c to exceeds the limit (0xFFFF). + * - The range (@c to - @c from) exceeds the limit (0xFFFF). * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. * @remarks - * - Before calling this method, check whether the feature is supported by + * - Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). * - The specific error code can be accessed using the GetLastResult() method. - * @see AddCbsChannel() - * @see RemoveCbsChannel() + * @see AddCbsChannel() + * @see RemoveCbsChannel() */ CbsChannel* GetCbsChannelN(int from, int to) const; - /** + /** * Gets the CBS channel list. * * @since 2.0 @@ -579,19 +581,19 @@ namespace Tizen { namespace Messaging * * @feature %http://tizen.org/feature/network.telephony.sms.cbs * - * @return A pointer to the list of CBS channel + * @return A pointer to the list of CBS channels * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. * @remarks - * - Before calling this method, check whether the feature is supported by + * - Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). * - The specific error code can be accessed using the GetLastResult() method. - * @see AddCbsChannel() - * @see RemoveCbsChannel() - * @see CbsChannel + * @see AddCbsChannel() + * @see RemoveCbsChannel() + * @see CbsChannel */ Tizen::Base::Collection::IList* GetCbsChannelListN(void); diff --git a/inc/FMsgSmsMessage.h b/inc/FMsgSmsMessage.h index df875ec..444e55a 100755 --- a/inc/FMsgSmsMessage.h +++ b/inc/FMsgSmsMessage.h @@ -39,13 +39,13 @@ namespace Tizen { namespace Messaging class _SmsMessageImpl; class RecipientList; - /** + /** * @class SmsMessage * @brief This class provides methods for handling an SMS message. * * @since 2.0 * - * The %SmsMessage class provides methods for handling SMS messages. It allows you to set and get the body text of an SMS message. + * The %SmsMessage class provides methods for handling SMS messages. It allows the user to set and get the body text of an SMS message. * * For more information on the class features, see Messaging Guide. */ @@ -54,69 +54,69 @@ namespace Tizen { namespace Messaging { // Life cycle public: - /** + /** * This is the default constructor for this class. * * @since 2.0 */ SmsMessage(void); - /** + /** * This is the destructor for this class. * * @since 2.0 */ virtual ~SmsMessage(void); - /** + /** * This is the copy constructor for the %SmsMessage class. * * @since 2.0 * - * @param[in] value An instance of %SmsMessage + * @param[in] value An instance of %SmsMessage to copy */ SmsMessage(const SmsMessage& value); public: - /** - * This assignment operator copies an SMS message from the specified instance of %SmsMessage to the calling instance of %SmsMessage. + /** + * This assignment operator copies an SMS message from the specified instance of %SmsMessage to the current instance of %SmsMessage. * * @since 2.0 * - * @return A reference to the %SmsMessage instance + * @return A reference to the %SmsMessage instance * @param[in] rhs A reference to the %SmsMessage instance to copy */ SmsMessage& operator =(const SmsMessage& rhs); - /** - * Compares the calling instance with the specified instance. + /** + * Compares the specified instance with the current instance. * * @since 2.0 * - * @return @c true if the specified instance of Tizen::Base::Object is equal to the calling %SmsMessage instance, @n - * else @c false - * @param[in] obj The object to compare + * @return @c true if the specified instance of Tizen::Base::Object is equal to the current %SmsMessage instance, @n + * else @c false + * @param[in] obj The object to compare */ virtual bool Equals(const Tizen::Base::Object& obj) const; - /** + /** * Gets the hash value of the current instance. * * @since 2.0 * - * @return The hash value of the current instance + * @return The hash value of the current instance */ virtual int GetHashCode(void) const; // Operation public: - /** - * Sets the body of the SMS message. + /** + * Sets the body of an SMS message. * * @since 2.0 * - * @return An error code + * @return An error code * @param[in] text The body of the SMS message * @exception E_SUCCESS The method is successful. * @exception E_MAX_EXCEEDED The body length of the message exceeds the maximum limit (Maximum 80 characters). @@ -124,61 +124,64 @@ namespace Tizen { namespace Messaging */ result SetText(const Tizen::Base::String& text); - /** - * Gets the body of the SMS message. + /** + * Gets the body of an SMS message. * * @since 2.0 * * @return The body of the SMS message * @remarks - * - If the message is from the Inbox, Sentbox, or Outbox, it may contain only @c 160 bytes for the body text. - * - To check whether the message contains more than @c 160 bytes for the body text, use the HasMoreText() method. - * - To get the full body text, use the SmsManager::GetFullText() method with its message ID. - * @see SetText() - * @see HasMoreText() - * @see GetId() - * @see SmsManager::GetFullText() + * - If the message is from the Inbox, Sentbox, or Outbox, it may contain only @c 160 bytes for the body text. + * - To check whether the message contains more than @c 160 bytes for the body text, use the HasMoreText() method. + * - To get the full body text, use the SmsManager::GetFullText() method with its message ID. + * @see SetText() + * @see HasMoreText() + * @see GetId() */ Tizen::Base::String GetText(void) const; - /** - * Gets the sender address of the SMS message. + /** + * Gets the sender address of an SMS message. * * @since 2.0 * @privlevel public * @privilege %http://tizen.org/privilege/messaging.read @n * (%http://tizen.org/privilege/messaging.sms is deprecated.) * - * @return The sender address of the SMS message + * @return The sender address of the SMS message * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION This operation is only allowed to the incoming message or the message from the Inbox. + * @exception E_INVALID_OPERATION Either of the following conditions has occurred: + * - This operation is only allowed to the incoming message. + * - This operation is only allowed to the message from the Inbox. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Base::String GetSenderAddress(void) const; - /** - * Gets the received time of the SMS message. + /** + * Gets the received time of an SMS message. * * @since 2.0 * @privlevel public * @privilege %http://tizen.org/privilege/messaging.read @n * (%http://tizen.org/privilege/messaging.sms is deprecated.) * - * @return The received time of the SMS message @n + * @return The received time of the SMS message @n * The value is 00:00:00, January 1, 1 in case of an error. * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_OPERATION This operation is only allowed to the incoming message or the message from the Inbox. + * @exception E_INVALID_OPERATION Either of the following conditions has occurred: + * - This operation is only allowed to the incoming message. + * - This operation is only allowed to the message from the Inbox. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Base::DateTime GetReceivedTime(void) const; - /** - * Gets the unique ID of the SMS message. + /** + * Gets the unique ID of an SMS message. * * @since 2.0 * @privlevel public @@ -186,17 +189,17 @@ namespace Tizen { namespace Messaging * (%http://tizen.org/privilege/messaging.sms is deprecated.) * * @return The unique ID of the SMS message @n - * The value is a negative value in case of an error. For example, @c -1. + * The value is a negative value in case of an error. For example, @c -1. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This operation is allowed only when the message is from the Inbox, Sentbox, or Outbox. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks The specific error code can be accessed using the GetLastResult() method. */ int GetId(void) const; - /** - * Gets the sent time of the SMS message. + /** + * Gets the sent time of an SMS message. * * @since 2.0 * @privlevel public @@ -204,17 +207,17 @@ namespace Tizen { namespace Messaging * (%http://tizen.org/privilege/messaging.sms is deprecated.) * * @return The sent time of the SMS message @n - * The value is 00:00:00, January 1, 1 in case of an error. + * The value is 00:00:00, January 1, 1 in case of an error. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This operation is allowed only when the message is from the Sentbox or Outbox. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks The specific error code can be accessed using the GetLastResult() method. */ Tizen::Base::DateTime GetSentTime(void) const; - /** - * Gets the type of the SMS message box. + /** + * Gets the type of an SMS message box. * * @since 2.0 * @privlevel public @@ -222,33 +225,33 @@ namespace Tizen { namespace Messaging * (%http://tizen.org/privilege/messaging.sms is deprecated.) * * @return The type of the SMS message box @n - * The value is @c SMS_MESSAGE_BOX_TYPE_NONE in case of an error. + * The value is @c SMS_MESSAGE_BOX_TYPE_NONE in case of an error. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This operation is allowed only when the message is from the Inbox, Sentbox, or Outbox. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks The specific error code can be accessed using the GetLastResult() method. */ SmsMessageBoxType GetMessageBoxType(void) const; - /** - * Gets the list of the recipients. + /** + * Gets the list of recipients. * * @since 2.0 * @privlevel public * @privilege %http://tizen.org/privilege/messaging.read @n * (%http://tizen.org/privilege/messaging.sms is deprecated.) * - * @return The list of the recipient + * @return The list of recipients * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This operation is allowed only when the message is from the Sentbox or Outbox. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks The specific error code can be accessed using the GetLastResult() method. */ RecipientList GetRecipientList(void) const; - /** + /** * Checks whether the SMS message contains more than @c 160 bytes for the body text. * * @since 2.0 @@ -261,11 +264,11 @@ namespace Tizen { namespace Messaging * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION This operation is allowed only when the message is from the Inbox, Sentbox, or Outbox. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. - * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1 + * @exception E_USER_NOT_CONSENTED The user has blocked the application from calling this method. @b Since: @b 2.1 * @remarks - * - If the return value is @c true, the SMS message contains more than @c 160 bytes for the body text. - * - To get the full body text, use SmsManager::GetFullText(). - * - The specific error code can be accessed using the GetLastResult() method. + * - If the return value is @c true, the SMS message contains more than @c 160 bytes for the body text. + * - To get the full body text, use SmsManager::GetFullText(). + * - The specific error code can be accessed using the GetLastResult() method. */ bool HasMoreText(void) const; diff --git a/inc/FMsgTypes.h b/inc/FMsgTypes.h index f2c7ce0..972f44f 100755 --- a/inc/FMsgTypes.h +++ b/inc/FMsgTypes.h @@ -16,7 +16,7 @@ // /** * @file FMsgTypes.h - * @brief This is the header file for the enumerations of the Messaging namespace. + * @brief This is the header file for the enumerations of the %Messaging namespace. * * This header file contains the type declarations of the Messaging namespace. */ @@ -26,7 +26,7 @@ namespace Tizen { namespace Messaging { - /** + /** * @enum RecipientType * * Defines the recipient type for a Short Message Service(SMS), Multimedia %Messaging Service(MMS), and email messages. @@ -35,12 +35,12 @@ namespace Tizen { namespace Messaging */ enum RecipientType { - RECIPIENT_TYPE_TO = 0, /**Application Filtering. * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). - * @see IWapPushEventListener - * @see RemoveWapPushEventListener() + * @see RemoveWapPushEventListener() */ result AddWapPushEventListener(const Tizen::Base::String& wapApplicationId, IWapPushEventListener& listener); - /** - * Removes the event listener for receiving WAP Push messages for a specific WAP Push application - * ID. + /** + * Removes the event listener for receiving WAP Push messages for the specified WAP Push application ID. * * @since 2.0 * @privlevel platform @@ -100,12 +99,12 @@ public: * * @feature %http://tizen.org/feature/network.telephony * @return An error code - * @param[in] wapApplicationId The X-Wap-Application-Id indicating a WAP Push - * application ID - * @param[in] listener A listener for receiving the incoming WAP Push messages + * @param[in] wapApplicationId The X-Wap-Application-Id that indicates the WAP Push application ID + * @param[in] listener The listener for receiving the incoming WAP Push messages * @exception E_SUCCESS The method is successful. - * @exception E_OBJ_NOT_FOUND The specified @c wapApplicationId is not registered, or - * the specified @c listener is not found. + * @exception E_OBJ_NOT_FOUND Either of the following conditions has occurred: + * - The specified @c wapApplicationId is not registered. + * - The specified @c listener is not found. * @exception E_INVALID_ARG The specified @c wapApplicationId is invalid. * @exception E_SYSTEM A system error has occurred. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. @@ -113,13 +112,12 @@ public: * For more information, see Application Filtering. * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). - * @see IWapPushEventListener - * @see AddWapPushEventListener() + * @see AddWapPushEventListener() */ result RemoveWapPushEventListener(const Tizen::Base::String& wapApplicationId, IWapPushEventListener& listener); - /** - * Registers a condition to receive WAP Push message. + /** + * Registers a condition to receive a WAP Push message. * * @since 2.0 * @privlevel platform @@ -127,24 +125,26 @@ public: * * @feature %http://tizen.org/feature/network.telephony * @return An error code - * @param[in] wapApplicationId The X-Wap-Application-Id indicating a WAP push application ID - * @param[in] contentType The MIME content type of the content - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c contentType or @c wapApplicationId is invalid. - * @exception E_ILLEGAL_ACCESS The application does not have the permission to register the conditions. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @param[in] wapApplicationId The X-Wap-Application-Id that indicates the WAP push application ID + * @param[in] contentType The MIME content type of the content + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c contentType is invalid. + * - The specified @c wapApplicationId is invalid. + * @exception E_ILLEGAL_ACCESS The application does not have the permission to register the conditions. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. - * @exception E_ALREADY_SET The condition is already registered. + * @exception E_ALREADY_SET The condition is already registered. * @remarks Before calling this method, check whether the feature is supported by * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). * @see UnregisterCondition() */ result RegisterCondition(const Tizen::Base::String& wapApplicationId, const Tizen::Base::String& contentType); - /** - * Unregisters a condition to receive WAP push message. + /** + * Unregisters a condition to receive a WAP push message. * * @since 2.0 * @privlevel platform @@ -152,13 +152,15 @@ public: * * @feature %http://tizen.org/feature/network.telephony * @return An error code - * @param[in] wapApplicationId The X-Wap-Application-Id indicating a WAP push application ID - * @param[in] contentType The MIME content type of the content - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified @c contentType or @c wapApplicationId is invalid. - * @exception E_ILLEGAL_ACCESS The application does not have the permission to unregister the conditions. - * @exception E_SYSTEM A system error has occurred. - * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @param[in] wapApplicationId The X-Wap-Application-Id that indicates the WAP push application ID + * @param[in] contentType The MIME content type of the content + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c contentType is invalid. + * - The specified @c wapApplicationId is invalid. + * @exception E_ILLEGAL_ACCESS The application does not have the permission to unregister the conditions. + * @exception E_SYSTEM A system error has occurred. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 * For more information, see Application Filtering. * @remarks Before calling this method, check whether the feature is supported by diff --git a/inc/FMsgWapPushMessage.h b/inc/FMsgWapPushMessage.h index 9f5cd92..dd4a72c 100755 --- a/inc/FMsgWapPushMessage.h +++ b/inc/FMsgWapPushMessage.h @@ -15,11 +15,11 @@ // limitations under the License. // /** -* @file FMsgWapPushMessage.h -* @brief This is the header file for the %WapPushMessage class. -* -* This header file contains the declarations of the %WapPushMessage class. -*/ + * @file FMsgWapPushMessage.h + * @brief This is the header file for the %WapPushMessage class. + * + * This header file contains the declarations of the %WapPushMessage class. + */ #ifndef _FMSG_WAP_PUSH_MESSAGE_H_ #define _FMSG_WAP_PUSH_MESSAGE_H_ @@ -37,21 +37,21 @@ namespace Tizen { namespace Messaging class _WapPushMessageImpl; /** -* @class WapPushMessage -* @brief This class provides methods for handling a WAP Push message. -* -* @since 2.0 -* -* @final This class is not intended for extension. -* -* The %WapPushMessage class provides methods for handling a WAP Push message. @n -* The methods of this class fetches the header and the body of a WAP Push message. -*/ + * @class WapPushMessage + * @brief This class provides methods for handling a WAP Push message. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %WapPushMessage class provides methods for handling a WAP Push message. @n + * The methods of this class fetch the header and body of a WAP Push message. + */ class _OSP_EXPORT_ WapPushMessage : public Tizen::Base::Object { public: - /** + /** * This destructor overrides Tizen::Base::Object::~Object(). * * @since 2.0 @@ -60,42 +60,42 @@ public: public: - /** + /** * Gets the header of a message. * * @since 2.0 * - * @return The header of a message @n - * The header has X-Wap-Application-Id and Content-Type fields. + * @return The header of the message @n + * The header has the X-Wap-Application-Id and Content-Type fields. */ Tizen::Base::String GetHeader(void) const; - /** + /** * Gets the body of a message. * * @since 2.0 * - * @return The body of a message @n - * The value is @c null in case of an error. + * @return The body of the message, @n + * else @c null in case of an error * @remarks - * - The message body can be any MIME content-type. - * - The specific error code can be accessed using the GetLastResult() method. + * - The message body can be any MIME content-type. + * - The specific error code can be accessed using the GetLastResult() method. */ Tizen::Base::ByteBuffer* GetBodyN(void) const; - /** - * Compares the calling instance with the specified instance. + /** + * Compares the specified instance with the current instance. * * @since 2.0 * - * @return @c true if the specified instance of Tizen::Base::Object is equal to the calling %WapPushMessage instance, @n + * @return @c true if the specified instance of Tizen::Base::Object is equal to the current %WapPushMessage instance, @n * else @c false * @param[in] obj An instance of Tizen::Base::Object to compare * @see Tizen::Base::Object::Equals() */ virtual bool Equals(const Tizen::Base::Object& obj) const; - /** + /** * Gets the hash value of the current instance. * * @since 2.0 @@ -104,13 +104,13 @@ public: */ virtual int GetHashCode(void) const; - /** - * Gets the copied instance of the class. + /** + * Gets the copied instance of this class. * * @since 2.0 * * @return An instance of %WapPushMessage, @n - * else @c null in case of an error + * else @c null in case of an error * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. * @remarks The specific error code can be accessed using the GetLastResult() method. diff --git a/packaging/osp-messaging.spec b/packaging/osp-messaging.spec index 7aead78..9fd2d79 100644 --- a/packaging/osp-messaging.spec +++ b/packaging/osp-messaging.spec @@ -65,12 +65,23 @@ osp messaging library (DEV) %prep %setup -q -%build +%build +%if 0%{?tizen_build_binary_release_type_eng} +CXXFLAGS="$CXXFLAGS -D_SECURE_LOG" +%endif MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %ifarch %{ix86} -CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%if 0%{?simulator} +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%else +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%endif %else +%if 0%{?tizen_build_binary_release_type_eng} CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%else +CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%endif %endif # Call make instruction with smp support diff --git a/src/FMsgDetailedEmailMessage.cpp b/src/FMsgDetailedEmailMessage.cpp index fc57553..248da2b 100644 --- a/src/FMsgDetailedEmailMessage.cpp +++ b/src/FMsgDetailedEmailMessage.cpp @@ -331,13 +331,8 @@ DetailedEmailMessage::SetFilePath(EmailMessageBodyType type, const Tizen::Base:: isFileExist = File::IsFileExist(filePath); r = GetLastResult(); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[E_INVALID_ARG] Propagating."); - - if (!isFileExist) - { - r = E_FILE_NOT_FOUND; - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[E_FILE_NOT_FOUND] Propagating."); - } + SysTryCatch(NID_MSG, r == E_SUCCESS, r = E_INVALID_ARG , E_INVALID_ARG, "[E_INVALID_ARG] Propagating."); + SysTryCatch(NID_MSG, isFileExist == true, r = E_FILE_NOT_FOUND , E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] Propagating."); r = __pImpl->SetFilePath(type, filePath); return r; @@ -480,13 +475,8 @@ DetailedEmailMessage::ParseMimeFile(const Tizen::Base::String& filePath, Detaile isFileExist = File::IsFileExist(filePath); r = GetLastResult(); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[E_INVALID_ARG] Propagating."); - - if (!isFileExist) - { - r = E_FILE_NOT_FOUND; - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[E_FILE_NOT_FOUND] Propagating."); - } + SysTryCatch(NID_MSG, r == E_SUCCESS, r = E_INVALID_ARG , E_INVALID_ARG, "[E_INVALID_ARG] Propagating."); + SysTryCatch(NID_MSG, isFileExist == true, r = E_FILE_NOT_FOUND , E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] Propagating."); r = _DetailedEmailMessageImpl::ParseMimeFile(filePath, message); return r; @@ -510,13 +500,8 @@ DetailedEmailMessage::WriteToMimeFile(const DetailedEmailMessage& message, const isFileExist = File::IsFileExist(filePath); r = GetLastResult(); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[E_INVALID_ARG] Propagating."); - - if (isFileExist) - { - r = E_FILE_ALREADY_EXIST; - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[E_FILE_NOT_FOUND] Propagating."); - } + SysTryCatch(NID_MSG, r == E_SUCCESS, r = E_INVALID_ARG , E_INVALID_ARG, "[E_INVALID_ARG] Propagating."); + SysTryCatch(NID_MSG, isFileExist == false, r = E_FILE_ALREADY_EXIST , E_FILE_ALREADY_EXIST, "[E_FILE_ALREADY_EXIST] Propagating."); r = _DetailedEmailMessageImpl::WriteToMimeFile(message, filePath); return r; diff --git a/src/FMsgEmailAttachment.cpp b/src/FMsgEmailAttachment.cpp index e5f2ef1..5113543 100644 --- a/src/FMsgEmailAttachment.cpp +++ b/src/FMsgEmailAttachment.cpp @@ -158,13 +158,8 @@ EmailAttachment::SetFilePath(const Tizen::Base::String& filePath) isFileExist = File::IsFileExist(filePath); r = GetLastResult(); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[E_INVALID_ARG] Propagating."); - - if (!isFileExist) - { - r = E_FILE_NOT_FOUND; - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[E_FILE_NOT_FOUND] Propagating."); - } + SysTryCatch(NID_MSG, r == E_SUCCESS, r = E_INVALID_ARG , E_INVALID_ARG,"[E_INVALID_ARG] Propagating."); + SysTryCatch(NID_MSG, isFileExist == true, r = E_FILE_NOT_FOUND , E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] Propagating."); r = __pImpl->SetFilePath(filePath); diff --git a/src/FMsg_DetailedEmailMessageImpl.cpp b/src/FMsg_DetailedEmailMessageImpl.cpp old mode 100644 new mode 100755 index 8285766..5408d9e --- a/src/FMsg_DetailedEmailMessageImpl.cpp +++ b/src/FMsg_DetailedEmailMessageImpl.cpp @@ -903,10 +903,20 @@ _DetailedEmailMessageImpl::WriteToMimeFile(const DetailedEmailMessage& message, pAttachName = _StringConverter::CopyToCharArrayN(pEmailAttachmentItem->GetName()); SysTryCatch(NID_MSG, pAttachName != null, r = E_OUT_OF_MEMORY, r, "memory allocation failed"); pTempAttachmentData->attachment_name = strdup(pAttachName); + if (pAttachName) + { + delete[] pAttachName; + pAttachName = null; + } pAttachFilePath = _StringConverter::CopyToCharArrayN(pEmailAttachmentItem->GetFilePath()); SysTryCatch(NID_MSG, pAttachFilePath != null, r = E_OUT_OF_MEMORY, r, "memory allocation failed"); pTempAttachmentData->attachment_path = strdup(pAttachFilePath); + if (pAttachFilePath) + { + delete[] pAttachFilePath; + pAttachFilePath = null; + } pTempAttachmentData->inline_content_status = (int) pEmailAttachmentItem->GetInlineContentStatus(); pTempAttachmentData->drm_status = (int) pEmailAttachmentItem->GetDrmStatus(); @@ -914,6 +924,11 @@ _DetailedEmailMessageImpl::WriteToMimeFile(const DetailedEmailMessage& message, pAttachMimeType = _StringConverter::CopyToCharArrayN(pEmailAttachmentItem->GetMimeType()); SysTryCatch(NID_MSG, pAttachMimeType != null, r = E_OUT_OF_MEMORY, r, "memory allocation failed"); pTempAttachmentData->attachment_mime_type = strdup(pAttachMimeType); + if (pAttachMimeType) + { + delete[] pAttachMimeType; + pAttachMimeType = null; + } pTempAttachmentData++; } @@ -933,24 +948,6 @@ _DetailedEmailMessageImpl::WriteToMimeFile(const DetailedEmailMessage& message, pEmlFilePath = null; } - if (pAttachName) - { - delete[] pAttachName; - pAttachName = null; - } - - if (pAttachFilePath) - { - delete[] pAttachFilePath; - pAttachFilePath = null; - } - - if (pAttachMimeType) - { - delete[] pAttachMimeType; - pAttachMimeType = null; - } - if (pMailData) { email_free_mail_data(&pMailData, 1); diff --git a/src/FMsg_MsgUtil.cpp b/src/FMsg_MsgUtil.cpp index e84d934..26e62a6 100644 --- a/src/FMsg_MsgUtil.cpp +++ b/src/FMsg_MsgUtil.cpp @@ -1265,7 +1265,7 @@ _MsgUtil::AddEmailMessageAddress(const RecipientList& recipientList, RecipientTy { pRecipient = dynamic_cast< String* >(pRecipientList->GetAt(index)); SysTryCatch(NID_MSG, pRecipient != null, r = GetLastResult(), r, "[%s] Failed to get recipient", GetErrorMessage(r)); - tempRecipient.Append(L",<" + *pRecipient + L">"); + tempRecipient.Append(L";<" + *pRecipient + L">"); } if(RECIPIENT_TYPE_TO == type) @@ -1665,17 +1665,17 @@ _MsgUtil::SendEmail(const EmailMessage& message, const RecipientList& recipientL pMail->subject = _StringConverter::CopyToCharArrayN(message.GetSubject()); r = AddEmailMessageBody(pMail,_StringConverter::CopyToCharArrayN(message.GetText())); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "[%s] email add body failed", GetErrorMessage(r)); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] email add body failed", GetErrorMessage(r)); r = AddEmailMessageAddress(recipientList, RECIPIENT_TYPE_TO, pMail); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "[%s] email add recipient failed", GetErrorMessage(r)); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] email add recipient failed", GetErrorMessage(r)); r = AddEmailMessageAddress(recipientList, RECIPIENT_TYPE_CC, pMail); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "[%s] email add recipient failed", GetErrorMessage(r)); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] email add recipient failed", GetErrorMessage(r)); r = AddEmailMessageAddress(recipientList, RECIPIENT_TYPE_BCC, pMail); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "[%s] email add recipient failed", GetErrorMessage(r)); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] email add recipient failed", GetErrorMessage(r)); r = AddEmailMessageAttachment(message, &pAttach, pMail); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "[%s] email add recipient failed", GetErrorMessage(r)); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] email add recipient failed", GetErrorMessage(r)); if( null != pAttach) @@ -1688,11 +1688,11 @@ _MsgUtil::SendEmail(const EmailMessage& message, const RecipientList& recipientL } r = _MsgUtil::EmailConvertException(err); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "To make email body is failed."); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] To make email body is failed.", GetErrorMessage(r)); err = email_send_mail(pMail->mail_id, &requestId); r = _MsgUtil::EmailConvertException(err); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The sent mail is failed."); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] The sent mail is failed.", GetErrorMessage(r)); mailId = pMail->mail_id; @@ -1731,8 +1731,8 @@ _MsgUtil::SendEmail(const EmailMessage& message, const RecipientList& recipientL } email_free_mail_data(&pMail, 1); email_free_mailbox(&pMailbox, 1); + email_free_account(&pAccount, 1); email_service_end(); - return r; CATCH: @@ -1769,8 +1769,8 @@ CATCH: } email_free_mail_data(&pMail, 1); email_free_mailbox(&pMailbox, 1); + email_free_account(&pAccount, 1); email_service_end(); - return r; } diff --git a/src/FMsg_PushMessageImpl.cpp b/src/FMsg_PushMessageImpl.cpp index 56cd859..10df019 100755 --- a/src/FMsg_PushMessageImpl.cpp +++ b/src/FMsg_PushMessageImpl.cpp @@ -216,8 +216,11 @@ _PushMessageImpl::ConvertMessageToNotification(const String& message) { result r = E_SUCCESS; int badgeNumber = 0; + String badgeValue; String alertText; + SysLog(NID_MSG, "Set notification with message[%ls]", message.GetPointer()); + r = __notiMessage.SetAppMessage(__text); StringTokenizer tokens(message, _PUSH_MESSAGE_TOKEN_DELIMITER); @@ -227,7 +230,6 @@ _PushMessageImpl::ConvertMessageToNotification(const String& message) String token; String key; String value; - String badgeValue; int delimiterIndex; tokens.GetNextToken(token); @@ -257,29 +259,16 @@ _PushMessageImpl::ConvertMessageToNotification(const String& message) if (IsFailed(r)) continue; - if (badgeValue.Equals(_PUSH_MESSAGE_VALUE_BADGE_SET, false) == true) - { - r = __notiMessage.SetBadgeNumber(badgeNumber); - if (IsFailed(r)) - continue; - } - else if (badgeValue.Equals(_PUSH_MESSAGE_VALUE_BADGE_INCREASE, false) == true) - { - r = __notiMessage.SetBadgeOffset(badgeNumber); - if (IsFailed(r)) - continue; - } - else if (badgeValue.Equals(_PUSH_MESSAGE_VALUE_BADGE_DECREASE, false) == true) + if (badgeNumber < 0) { - r = __notiMessage.SetBadgeOffset(badgeNumber); - if (IsFailed(r)) - continue; + SysLog(NID_MSG, "badgeNumber[%d] is negative, so treat it as '0'", badgeNumber); + badgeNumber = 0; } - else + + if (badgeNumber > MAX_NOTIFICATION_BADGE_NUMBER) { - r = __notiMessage.SetBadgeOffset(0); - if (IsFailed(r)) - continue; + SysLog(NID_MSG, "badgeNumber[%d] is out of range, so treat it as '%d'", badgeNumber, MAX_NOTIFICATION_BADGE_NUMBER); + badgeNumber = MAX_NOTIFICATION_BADGE_NUMBER; } } else if (key.Equals(_PUSH_MESSAGE_KEY_ACTION, false) == true) @@ -323,6 +312,23 @@ _PushMessageImpl::ConvertMessageToNotification(const String& message) } } + + if (badgeValue.Equals(_PUSH_MESSAGE_VALUE_BADGE_SET, false) == true) + { + r = __notiMessage.SetBadgeNumber(badgeNumber); + SysLog(NID_MSG, "Set badgeNumber[%d] result[%s]", badgeNumber, GetErrorMessage(r)); + } + else if (badgeValue.Equals(_PUSH_MESSAGE_VALUE_BADGE_INCREASE, false) == true) + { + r = __notiMessage.SetBadgeOffset(badgeNumber); + SysLog(NID_MSG, "Set badgeOffset[%d] result[%s]", badgeNumber, GetErrorMessage(r)); + } + else if (badgeValue.Equals(_PUSH_MESSAGE_VALUE_BADGE_DECREASE, false) == true) + { + r = __notiMessage.SetBadgeOffset(-badgeNumber); + SysLog(NID_MSG, "Set badgeOffset[%d] result[%s]", badgeNumber, GetErrorMessage(r)); + } + SysLog(NID_MSG, "The converted value of action is [%d].", __pushAction); SysLog(NID_MSG, "The converted value of badgeOffset is [%d], badgeNumber is [%d].", __notiMessage.GetBadgeOffset(), __notiMessage.GetBadgeNumber()); SysLog(NID_MSG, "The converted value of alertText is [%ls], appMessage is [%ls].", (__notiMessage.GetAlertText()).GetPointer(), (__notiMessage.GetAppMessage()).GetPointer()); diff --git a/src/FMsg_SmsManagerImpl.cpp b/src/FMsg_SmsManagerImpl.cpp index cf2b771..715f671 100644 --- a/src/FMsg_SmsManagerImpl.cpp +++ b/src/FMsg_SmsManagerImpl.cpp @@ -216,6 +216,7 @@ _SmsManagerImpl::AddSmsEventListener(int port, ISmsEventListener& eventListener) CATCH: if (pSmsTriggerEvent) { + __pSmsTriggerEventList->Remove(*pSmsTriggerEvent); delete pSmsTriggerEvent; } @@ -254,6 +255,7 @@ _SmsManagerImpl::RemoveSmsEventListener(int port, ISmsEventListener& eventListen // remove corresponding event from the list r = __pSmsTriggerEventList->RemoveAt(index, true); + SysTryReturn(NID_MSG, r == E_SUCCESS, r, r, "Failed to remove the event listener"); return r; @@ -282,8 +284,7 @@ _SmsManagerImpl::AddSmsMessageEventListener(const ISmsMessageEventListener& even r = __pSmsReceiveEvent->AddListener(eventListener, true); SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "Failed to add a listener"); - err = msg_reg_sms_message_callback(__msgHandle, &_SmsMmsCallbackHandler::IncomingSmsMessageCallback, 0, (void*) - __pSmsReceiveEvent); + err = _SmsMmsCallbackHandler::GetInstance()->RegisterIncomingMessageCallback(__pSmsReceiveEvent); r = ConvertException(err); SysTryCatch(NID_MSG, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[%s] Failed to register for incoming sms callback.", GetErrorMessage(r)); diff --git a/src/FMsg_SmsMmsCallbackHandler.cpp b/src/FMsg_SmsMmsCallbackHandler.cpp index f21eac6..00050c5 100644 --- a/src/FMsg_SmsMmsCallbackHandler.cpp +++ b/src/FMsg_SmsMmsCallbackHandler.cpp @@ -51,11 +51,10 @@ bool _SmsMmsCallbackHandler::__destroyed = false; _SmsMmsCallbackHandler::_SmsMmsCallbackHandler(void) : __msgHandle(0) - , __cbsSettingsHandle(0) - , __pCbsChannelList(0) - , __pTempCbsChannelList(0) , __callbackRegistered(false) , __incomingSmsCallbackRegistered(true) + , __incomingCallbackRegistered(false) + , __pSmsIncomingEvent(null) { } @@ -71,10 +70,6 @@ _SmsMmsCallbackHandler::Construct() r = __msgMutex.Create(); } - __pTempCbsChannelList = new (std::nothrow) ArrayList(); - SysTryReturnResult(NID_MSG, __pTempCbsChannelList != null, E_OUT_OF_MEMORY, "memory allocation failed"); - r = __pTempCbsChannelList->Construct(); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "Failed to construct an ArrayList"); std::atexit(CloseCbsSettingsHandle); return r; @@ -149,21 +144,6 @@ _SmsMmsCallbackHandler::~_SmsMmsCallbackHandler(void) __msgMutex.Release(); - if (__cbsSettingsHandle) - { - msg_release_struct(&__cbsSettingsHandle); - __cbsSettingsHandle = 0; - } - - if (__pTempCbsChannelList) - { - if (__pTempCbsChannelList->GetCount() > 0) - { - __pTempCbsChannelList->RemoveAll(true); - } - delete __pTempCbsChannelList; - __pTempCbsChannelList = null; - } } _SmsMmsCallbackHandler* @@ -201,6 +181,10 @@ _SmsMmsCallbackHandler::OpenMessageHandle(msg_handle_t& messageHandle) if (!__msgHandle) { err = msg_open_msg_handle(&__msgHandle); + if ( err != MSG_SUCCESS ) + { + __msgHandle = null; + } } messageHandle = __msgHandle; @@ -208,344 +192,33 @@ _SmsMmsCallbackHandler::OpenMessageHandle(msg_handle_t& messageHandle) } int -_SmsMmsCallbackHandler::OpenCbsSettingsHandle(msg_struct_t& cbsSettingsHandle) +_SmsMmsCallbackHandler::RegisterMessageCallback() { int err = MSG_SUCCESS; - if (!__cbsSettingsHandle) + if (__msgHandle && !__callbackRegistered) { - __cbsSettingsHandle = msg_create_struct(MSG_STRUCT_SETTING_CB_OPT); - if (__cbsSettingsHandle && __msgHandle) - { - err = msg_get_cb_opt(__msgHandle, __cbsSettingsHandle); - } + err = msg_reg_sent_status_callback(__msgHandle, &_SmsMmsCallbackHandler::SentMessageStatusCallback, null); + __callbackRegistered = true; } - cbsSettingsHandle = __cbsSettingsHandle; return err; } -result -_SmsMmsCallbackHandler::AddCbsChannel(int from, int to, Tizen::Base::String& name, bool activate) -{ - result r = E_SUCCESS; - int fromId = 0; - int toId = 0; - bool channelFound = false; - SysLog(NID_MSG, "AddCbsChannel from %d to %d name %ls activate %d ",from, to, name.GetPointer(), activate); - - for (int index = 0; index < __pTempCbsChannelList->GetCount(); index++) - { - CbsChannel* pCbsChannel = null; - pCbsChannel = dynamic_cast< Tizen::Messaging::CbsChannel* >(__pTempCbsChannelList->GetAt(index)); - SysTryReturn(NID_MSG, pCbsChannel != null, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel."); - - pCbsChannel->GetRange(fromId, toId); - if (from == fromId && to == toId) - { - channelFound = true; - break; // found channel to be updated. - } - - - } - SysTryReturn(NID_MSG, channelFound == false, r = E_ALREADY_SET, E_ALREADY_SET, "Failed due to already cb range."); - - - if (!channelFound) - { - CbsChannel* pCbsChannel = null; - pCbsChannel = _CbsChannelImpl::GetCbsChannelN(from, to, name); - SysTryReturn(NID_MSG, pCbsChannel != null, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel."); - - if (activate) - { - _CbsChannelImpl::GetInstance(*pCbsChannel)->SetCbsChannelState(activate); - } - r =__pTempCbsChannelList->Add(*pCbsChannel); - SysTryReturn(NID_MSG,r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "Failed to set the channel."); - - } - - - - - r = SaveCbsSettings(); - return r; -} - -result -_SmsMmsCallbackHandler::RemoveCbsChannel(int from, int to) -{ - result r = E_SUCCESS; - int fromId = 0; - int toId = 0; - bool channelFound = false; - CbsChannel* pCbsChannel = NULL; - SysLog(NID_MSG, "RemoveCbsChannel from %d %d ",from, to); - - for (int index = 0; index < __pTempCbsChannelList->GetCount(); index++) - { - pCbsChannel = dynamic_cast< Tizen::Messaging::CbsChannel* >(__pTempCbsChannelList->GetAt(index)); - SysTryReturn(NID_MSG, pCbsChannel != null, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel."); - - pCbsChannel->GetRange(fromId, toId); - if (from == fromId && to == toId) - { - channelFound = true; // found channel to be removed. - __pTempCbsChannelList->RemoveAt(index); - index--; - delete pCbsChannel; - - } - } - - - if (!channelFound) - { - return E_OBJ_NOT_FOUND; - } - r = SaveCbsSettings(); - SysTryReturn(NID_MSG, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "Failed to remove the channel."); - - return r; -} - -result -_SmsMmsCallbackHandler::SearchCbsChannel(int from, int to, int& index) -{ - result r = E_SUCCESS; - int fromId = 0; - int toId = 0; - bool channelFound = false; - CbsChannel* pCbsChannel = NULL; - SysLog(NID_MSG, "SearchCbsChannel from %d %d ",from, to); - - for (int tempIndex = 0; tempIndex < __pTempCbsChannelList->GetCount(); tempIndex++) - { - pCbsChannel = dynamic_cast< Tizen::Messaging::CbsChannel* >(__pTempCbsChannelList->GetAt(tempIndex)); - SysTryReturn(NID_MSG, pCbsChannel != null, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel."); - - pCbsChannel->GetRange(fromId, toId); - if (from == fromId && to == toId) - { - channelFound = true; - index = tempIndex; - break; // found channel to be searched. - } - } - - if (!channelFound) - { - return E_OBJ_NOT_FOUND; - } - - return r; -} - -result -_SmsMmsCallbackHandler::UpdateCbsChannel(int from, int to, Tizen::Base::String name, bool activate) -{ - result r = E_SUCCESS; - int fromId = 0; - int toId = 0; - bool channelFound = false; - int index = 0; - CbsChannel* pCbsChannel = NULL; - SysLog(NID_MSG, "UpdateCbsChannel from %d to %d name %ls activate %d ",from, to, name.GetPointer(), activate); - - for (int i = 0; i < __pTempCbsChannelList->GetCount(); i++) - { - pCbsChannel = dynamic_cast< Tizen::Messaging::CbsChannel* >(__pTempCbsChannelList->GetAt(i)); - SysTryReturn(NID_MSG, pCbsChannel != null, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel."); - - pCbsChannel->GetRange(fromId, toId); - if (from == fromId && to == toId) - { - channelFound = true; - index = i; - break; // found channel to be updated. - } - } - - if (!channelFound) - { - return E_OBJ_NOT_FOUND; - } - - // set cbs channel name - _CbsChannelImpl::GetInstance(*pCbsChannel)->SetCbsChannelName(name); - - if (activate) - { - _CbsChannelImpl::GetInstance(*pCbsChannel)->SetCbsChannelState(activate); - } - else - { - _CbsChannelImpl::GetInstance(*pCbsChannel)->SetCbsChannelState(false); - } - //For changing to latest - __pTempCbsChannelList->RemoveAt(index); - __pTempCbsChannelList->Add(*pCbsChannel); - - r = SaveCbsSettings(); - SysTryReturn(NID_MSG, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "Failed to save the channel."); - - return r; -} - -result -_SmsMmsCallbackHandler::GetCbsChannel(int index, int& from, int& to, Tizen::Base::String& name, bool& activate) -{ - result r = E_SUCCESS; - CbsChannel* pCbsChannel = NULL; - - pCbsChannel = dynamic_cast< Tizen::Messaging::CbsChannel* >(__pTempCbsChannelList->GetAt(index)); - SysTryReturn(NID_MSG, pCbsChannel != null, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel."); - - pCbsChannel->GetRange(from, to); - name = pCbsChannel->GetName(); - if (pCbsChannel->IsActivated()) - { - activate = true; - } - else - { - activate = false; - } - return r; -} - -result -_SmsMmsCallbackHandler::GetCbsChannelsCount(int& count) -{ - result r = E_SUCCESS; - - if (__pTempCbsChannelList) - { - count = __pTempCbsChannelList->GetCount(); - } - - return r; -} - -result -_SmsMmsCallbackHandler::SaveCbsSettings() -{ - int err = MSG_SUCCESS; - result r = E_SUCCESS; - int fromId = 0; - int toId = 0; - bool isChannelActive = false; - String channelName; - char* pTempChannelName = null; - - SysTryReturn(NID_MSG, __pTempCbsChannelList != null, r = E_SYSTEM, E_SYSTEM, "Failed to save the channel."); - err = msg_get_list_handle(__cbsSettingsHandle, MSG_CB_CHANNEL_LIST_STRUCT, (void **)&__pCbsChannelList); - SysTryReturn(NID_MSG, err == MSG_SUCCESS, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel handle."); - SysLog(NID_MSG, "SaveCbsSettings Count %d, %d ",__pCbsChannelList->nCount,__pTempCbsChannelList->GetCount()); - __pCbsChannelList->nCount = __pTempCbsChannelList->GetCount(); - - // save Channel List - for (int index = 0; index < __pTempCbsChannelList->GetCount(); index++) - { - Tizen::Messaging::CbsChannel* pCbsChannel = dynamic_cast< Tizen::Messaging::CbsChannel* >(__pTempCbsChannelList->GetAt(index)); - SysTryReturn(NID_MSG, pCbsChannel != null, r = E_SYSTEM, E_SYSTEM, "Failed to get the channel."); - pCbsChannel->GetRange(fromId, toId); - channelName = pCbsChannel->GetName(); - if (pCbsChannel->IsActivated()) - { - isChannelActive = true; - } - - pTempChannelName = _StringConverter::CopyToCharArrayN(channelName); - SysTryReturn(NID_MSG, pTempChannelName != null, r = E_OUT_OF_MEMORY, r, "Memory allocation failed."); - - msg_set_bool_value(__pCbsChannelList->msg_struct_info[index], MSG_CB_CHANNEL_ACTIVATE_BOOL, isChannelActive); - msg_set_int_value(__pCbsChannelList->msg_struct_info[index], MSG_CB_CHANNEL_ID_FROM_INT, fromId); - msg_set_int_value(__pCbsChannelList->msg_struct_info[index], MSG_CB_CHANNEL_ID_TO_INT, toId); - msg_set_str_value(__pCbsChannelList->msg_struct_info[index], MSG_CB_CHANNEL_NAME_STR, - pTempChannelName,CB_CHANNEL_NAME_MAX); - - if (pTempChannelName) - { - delete[] pTempChannelName; - pTempChannelName = null; - } - } - - err = msg_set_cb_opt(__msgHandle, __cbsSettingsHandle); - r = ConvertException(err); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "Failed to save the channel.[%d] ",err); - return r; -} - -result -_SmsMmsCallbackHandler::LoadCbsSettings() -{ - int err = MSG_SUCCESS; - result r = E_SUCCESS; - CbsChannel* pCbsChannel = NULL; - int fromId = 0; - int toId = 0; - bool isChannelActive = false; - char channelName[CB_CHANNEL_NAME_MAX + 1] = {0,}; - - if (__pTempCbsChannelList->GetCount() > 0) - { - __pTempCbsChannelList->RemoveAll(true); - } - - - if (__cbsSettingsHandle) - { - // Load Channel List - err = msg_get_list_handle(__cbsSettingsHandle, MSG_CB_CHANNEL_LIST_STRUCT, (void **)&__pCbsChannelList); - r = ConvertException(err); - SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "Failed to open cbs Settings Handle"); - - for (int index = 0; index < __pCbsChannelList->nCount; index++) - { - msg_get_bool_value(__pCbsChannelList->msg_struct_info[index], MSG_CB_CHANNEL_ACTIVATE_BOOL, &isChannelActive); - msg_get_int_value(__pCbsChannelList->msg_struct_info[index], MSG_CB_CHANNEL_ID_FROM_INT, &fromId); - msg_get_int_value(__pCbsChannelList->msg_struct_info[index], MSG_CB_CHANNEL_ID_TO_INT, &toId); - msg_get_str_value(__pCbsChannelList->msg_struct_info[index], MSG_CB_CHANNEL_NAME_STR, - channelName,CB_CHANNEL_NAME_MAX); - if((toId >= 0) && (fromId >= 0) && (toId >= fromId) && (toId <= MAX_CBS_CHANNEL_LIMIT) && ((toId - fromId) <= MAX_CBS_CHANNEL_RANGE)) - { - - pCbsChannel = _CbsChannelImpl::GetCbsChannelN(fromId, toId, String(channelName)); - SysTryReturnResult(NID_MSG, pCbsChannel != null, E_SYSTEM, "Failed to get the channel."); - if (isChannelActive) - { - _CbsChannelImpl::GetInstance(*pCbsChannel)->SetCbsChannelState(isChannelActive); - } - __pTempCbsChannelList->Add(*pCbsChannel); - } - else - { - SysLog(NID_MSG, "Load CBS Error: From[%d] To[%d] ",fromId, toId); - - } - } - } - - return r; - -} - int -_SmsMmsCallbackHandler::RegisterMessageCallback() +_SmsMmsCallbackHandler::RegisterIncomingMessageCallback(Tizen::Base::Object* pSmsIncomingEvent) { - int err = MSG_SUCCESS; + int err = MSG_SUCCESS; - if (__msgHandle && !__callbackRegistered) - { - err = msg_reg_sent_status_callback(__msgHandle, &_SmsMmsCallbackHandler::SentMessageStatusCallback, null); - __callbackRegistered = true; - } + __pSmsIncomingEvent = pSmsIncomingEvent; - return err; + if (__msgHandle && !__incomingCallbackRegistered) + { + err = msg_reg_sms_message_callback(__msgHandle, &_SmsMmsCallbackHandler::IncomingSmsMessageCallback, 0, null); + __incomingCallbackRegistered = true; + } + + return err; } int @@ -749,7 +422,7 @@ _SmsMmsCallbackHandler::SentMessageStatusCallback(msg_handle_t hMsgHandle, msg_s void _SmsMmsCallbackHandler::IncomingSmsMessageCallback(msg_handle_t hMsgHandle, msg_struct_t newMsg, void* pUserParam) { - _SmsEvent* pSmsEvent = static_cast <_SmsEvent*>(pUserParam); + _SmsEvent* pSmsEvent = static_cast <_SmsEvent*>(_SmsMmsCallbackHandler::GetInstance()->__pSmsIncomingEvent); _SmsEventArg* pSmsEventArg = null; int msgSize = 0; diff --git a/src/FMsg_SmsMmsCallbackHandler.h b/src/FMsg_SmsMmsCallbackHandler.h index c314873..8eb687a 100644 --- a/src/FMsg_SmsMmsCallbackHandler.h +++ b/src/FMsg_SmsMmsCallbackHandler.h @@ -86,67 +86,6 @@ public: */ int OpenMessageHandle(msg_handle_t& messageHandle); - /** - * gets the Message Handle for Cbs message operation. - * - * @since 3.0 - * @return An error code - * @param[in] cbsSettingsHandle cbs message Handle - * @exception MSG_SUCCESS The method was successful. - * @exception MSG_ERR_NULL_POINTER Input parameter is NULL. - * @exception MSG_ERR_MEMORY_ERROR Memory error. - */ - int OpenCbsSettingsHandle(msg_struct_t& cbsSettingsHandle); - - // Adds a CBS channel with specified parameters. - result AddCbsChannel(int from, int to, Tizen::Base::String& name, bool activate); - - // Removes a CBS channel with specified parameters. - result RemoveCbsChannel(int from, int to); - - // Searches a CBS channel with specified parameters and returns index of channel found. - result SearchCbsChannel(int from, int to, int& index); - - // Updates a CBS channel with specified parameters. - result UpdateCbsChannel(int from, int to, Tizen::Base::String name, bool activate); - - // Gets a CBS channel data with specified index. - result GetCbsChannel(int index, int& from, int& to, Tizen::Base::String& name, bool& activate); - - // Gets a CBS channel count. - result GetCbsChannelsCount(int& count); - - /** - * loads the Cbs channels list. - * - * @since 3.0 - * @return An error code - * @exception E_SUCCESS The method was successful. - * @exception E_INVALID_ARG Input parameter is NULL. - * @exception E_OUT_OF_MEMORY Memory error. - */ - result LoadCbsSettings(); - - /** - * saves the Cbs channels list. - * - * @since 3.0 - * @return An error code - * @exception E_SUCCESS The method was successful. - * @exception E_INVALID_ARG Input parameter is NULL. - * @exception E_OUT_OF_MEMORY Memory error. - */ - result SaveCbsSettings(); - - /** - * closes the CBS Message Handle. - * - * @since 3.0 - * @return An error code - * @exception MSG_SUCCESS The method was successful. - * @exception MSG_ERR_NULL_POINTER Input parameter is NULL. - * @exception MSG_ERR_MEMORY_ERROR Memory error. - */ static void CloseCbsSettingsHandle(void); /** @@ -199,6 +138,18 @@ public: */ result GetAndRemoveFromMessageMap(int reqId, _MessageType& msgType, Tizen::Base::Object** pEvent); + /** + * Registers the Message call back for incoming SMS operation. + * + * @since 3.0 + * @return An error codea + * @param[in] pSmsIncomingEvent message Event + * @exception MSG_SUCCESS The method was successful. + * @exception MSG_ERR_NULL_POINTER Input parameter is NULL. + * @exception MSG_ERR_MEMORY_ERROR Memory error. + */ + int RegisterIncomingMessageCallback(Tizen::Base::Object* pSmsIncomingEvent); + // for SMS and MMS sent status static void SentMessageStatusCallback(msg_handle_t hMsgHandle, msg_struct_t msgStatus, void* pUserParam); @@ -231,11 +182,10 @@ private: private: static _SmsMmsCallbackHandler* __pMessageCallbackHandler; msg_handle_t __msgHandle; - msg_struct_t __cbsSettingsHandle; - msg_struct_list_s* __pCbsChannelList; - Tizen::Base::Collection::ArrayList* __pTempCbsChannelList; bool __callbackRegistered; bool __incomingSmsCallbackRegistered; + bool __incomingCallbackRegistered; + Tizen::Base::Object* __pSmsIncomingEvent; Tizen::Base::Collection::MultiHashMap __messageMap; Tizen::Base::Runtime::Mutex __msgMutex; static bool __destroyed; diff --git a/src/FMsg_WapPushManagerImpl.cpp b/src/FMsg_WapPushManagerImpl.cpp index eed31db..1d68894 100644 --- a/src/FMsg_WapPushManagerImpl.cpp +++ b/src/FMsg_WapPushManagerImpl.cpp @@ -85,19 +85,20 @@ _WapPushManagerImpl::AddWapPushEventListener(const Tizen::Base::String& wapAppli if (!__pWapPushReceiveEvent) { __pWapPushReceiveEvent = new (std::nothrow) _SmsEvent(); - SysTryCatch(NID_MSG, __pWapPushReceiveEvent != null, r = E_OUT_OF_MEMORY, r, "memory allocation failed."); + SysTryCatch(NID_MSG, __pWapPushReceiveEvent != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] memory allocation failed."); // event construction r = __pWapPushReceiveEvent->Construct(_SMS_EVENT_TYPE_WAP_PUSH_RECEIVE_RESULT); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "failed to construct push event"); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] failed to construct push event", GetErrorMessage(r)); } // add listener r = __pWapPushReceiveEvent->AddListener(listener, true); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "failed to add push listner."); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] failed to add push listner.", GetErrorMessage(r)); SysTryReturnResult(NID_MSG, _MessagingProxy::GetInstance()!= null, E_OUT_OF_MEMORY, "Failed to get msg proxy instance"); r = _MessagingProxy::GetInstance()->AddWapPushEventListener(wapApplicationId, __pWapPushReceiveEvent); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); return r; @@ -119,10 +120,10 @@ _WapPushManagerImpl::RemoveWapPushEventListener(const Tizen::Base::String& wapAp result r = E_SUCCESS; ClearLastResult(); - SysTryCatch(NID_MSG, __pWapPushReceiveEvent != null, r = E_OBJ_NOT_FOUND, r, "listner not found"); + SysTryCatch(NID_MSG, __pWapPushReceiveEvent != null, r = E_OBJ_NOT_FOUND, r, "[E_OBJ_NOT_FOUND] listner not found"); r = __pWapPushReceiveEvent->RemoveListener(listener); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "listner remove failed"); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] listner remove failed", GetErrorMessage(r)); delete __pWapPushReceiveEvent; __pWapPushReceiveEvent = null; @@ -139,8 +140,12 @@ _WapPushManagerImpl::RegisterCondition(const Tizen::Base::String& wapApplication result r = E_SUCCESS; SysTryReturnResult(NID_MSG, _MessagingProxy::GetInstance()!= null, E_OUT_OF_MEMORY, "Failed to get msg proxy instance"); r = _MessagingProxy::GetInstance()->RegisterCondition(wapApplicationId,contentType); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); return r; + +CATCH: + return r; } @@ -150,8 +155,12 @@ _WapPushManagerImpl::UnregisterCondition(const Tizen::Base::String& wapApplicati result r = E_SUCCESS; SysTryReturnResult(NID_MSG, _MessagingProxy::GetInstance()!= null, E_OUT_OF_MEMORY, "Failed to get msg proxy instance"); r = _MessagingProxy::GetInstance()->UnregisterCondition(wapApplicationId,contentType); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); return r; + +CATCH: + return r; } diff --git a/src/inc/FMsg_Types.h b/src/inc/FMsg_Types.h index 0e78c5b..7729c77 100644 --- a/src/inc/FMsg_Types.h +++ b/src/inc/FMsg_Types.h @@ -47,6 +47,7 @@ namespace Tizen { namespace Messaging // file size #define MAX_MMS_FILE_SIZE (295 * 1024) // 295KB = 300KB - 4KB (MMS header margin) - 1KB (margin for local language size) #define MAX_EMAIL_FILE_SIZE (5 * 1024 * 1024) // 5MB +#define MMS_1000K_FILE_SIZE (995 * 1024) // attachment count #define MAX_EMAIL_ATTACHMENT_COUNT 20 @@ -56,6 +57,7 @@ namespace Tizen { namespace Messaging #define MAX_LENGTH_PHONE 41 #define MIN_LENGTH_EMAIL 5 // a@b.c #define MAX_LENGTH_EMAIL (64 + 255 + 1) // RFC 2822 - Local(64) + Domain(255) + '@'(1) +#define MAX_SMS_LENGTH_PHONE 20 // keyword length for retrieving SMS inbox, sentbox, or outbox #define MIN_KEYWORD_LENGTH 1 -- 2.7.4