2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FMsg_MmsManagerImpl.h
19 * @brief This is the header file for the _MmsManagerImpl class.
21 * This header file contains the declarations of the _MmsManagerImpl class.
24 #ifndef _FMSG_INTERNAL_MMS_MANAGER_IMPL_H_
25 #define _FMSG_INTERNAL_MMS_MANAGER_IMPL_H_
28 #include <FBaseObject.h>
29 #include "FMsg_Types.h"
31 namespace Tizen { namespace Messaging
34 // forward declaration
42 * @class _MmsManagerImpl
43 * @brief This class provides methods to use the MMS messaging service.
46 * This class provides methods to use the MMS messaging service. @n
49 : public Tizen::Base::Object
54 * This is the default constructor for this class.
58 _MmsManagerImpl(void);
61 * This is the destructor for this class.
65 virtual ~_MmsManagerImpl(void);
68 _MmsManagerImpl(const _MmsManagerImpl& value);
69 _MmsManagerImpl& operator =(const _MmsManagerImpl& rhs);
74 * Initializes this instance of _MmsManagerImpl with the specified listener.
77 * @return An error code
78 * @param[in] listener The listener to receive a send result asynchronously
79 * @exception E_SUCCESS The method was successful.
81 result Construct(IMmsListener& listener);
84 * Sends the MMS message.
88 * @privgroup http://tizen.org/privilege/messaging.mms
90 * @return An error code
91 * @param[in] message The message to be sent
92 * @param[in] recipientList The list of recipients
93 * @param[in] saveToSentBox Set to @c true to save the message in the Sentbox, @n
95 * @exception E_SUCCESS The method was successful.
96 * @exception E_ON_INITIALIZING The mailbox is not completely loaded yet.
97 * @exception E_STORAGE_FULL The storage is full.
98 * @exception E_DEVICE_UNAVAILABLE The device is unavailable.
99 * @exception E_NETWORK_UNAVAILABLE The network is unavailable.
100 * @exception E_INVALID_CONDITION The profile is not set.
101 * @exception E_INVALID_ADDRESS The address is invalid.
102 * @exception E_FDN_MODE The FDN mode has been activated.
103 * @exception E_INVALID_ARG The number of recipients is @c 0 or the message is empty. @n
104 * @exception E_MAX_EXCEEDED The number of recipients crossed the limit (Maximum 10).
105 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
106 * @remarks Some service providers may not support sending MMS messages with an empty subject or body. @n
107 * In this case, the result of the status report will be the E_FAILURE exception.
108 * @see IMmsListener::OnMmsMessageSent()
110 result Send(const MmsMessage& message, const RecipientList& recipientList, bool saveToSentBox);
114 * Gets the Impl instance.
117 * @return The pointer to _MmsManagerImpl
118 * @param[in] mmsManager An instance of MmsManager
120 static _MmsManagerImpl* GetInstance(MmsManager& mmsManager);
123 * Gets the Impl instance.
126 * @return The pointer to _MmsManagerImpl
127 * @param[in] mmsManager An instance of MmsManager
129 static const _MmsManagerImpl* GetInstance(const MmsManager& mmsManager);
134 * Converts platform error codes
136 * @return An error code
137 * @param[in] err The error to convert
140 result ConvertException(int err) const;
143 std::unique_ptr<_MmsEvent> __pMmsEvent;
144 bool __isConstructed;
145 msg_handle_t __msgHandle;
146 }; // _MmsManagerImpl
149 #endif // _FMSG_INTERNAL_MMS_MANAGER_IMPL_H_