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 FMsgEmailAttachment.h
19 * @brief This is the header file for the %EmailAttachment class.
21 * This header file contains the declarations of the %EmailAttachment class.
24 #ifndef _FMSG_EMAIL_ATTACHMENT_H_
25 #define _FMSG_EMAIL_ATTACHMENT_H_
27 namespace Tizen { namespace Base
32 #include <FBaseObject.h>
33 #include <FMsgTypes.h>
35 namespace Tizen { namespace Messaging
37 // forward declaration
38 class _EmailAttachmentImpl;
41 * @class EmailAttachment
42 * @brief This class provides methods for handling email attachments.
46 * The %EmailAttachment class provides methods for handling email attachments.
48 class _OSP_EXPORT_ EmailAttachment
49 : public Tizen::Base::Object
54 * This is the default constructor for this class.
58 EmailAttachment(void);
61 * This is the destructor for this class.
65 virtual ~EmailAttachment(void);
68 * This is the copy constructor for the %EmailAttachment class. @n
69 * Copying of objects using this copy constructor is allowed.
73 * @param[in] rhs An instance of %EmailAttachment
75 EmailAttachment(const EmailAttachment& rhs);
79 * Assigns the value of the specified instance to the current instance of %EmailAttachment. @n
80 * Copying of objects using this copy assignment operator is allowed.
84 * @return The reference of this instance
85 * @param[in] rhs An instance of %EmailAttachment
87 EmailAttachment& operator =(const EmailAttachment& rhs);
90 * Compares the calling instance with the specified instance.
94 * @return @c true if the specified instance of Tizen::Base::Object is equal to the calling %EmailAttachment instance, @n
96 * @param[in] obj An instance of Tizen::Base::Object to compare
98 virtual bool Equals(const Tizen::Base::Object& obj) const;
101 * Gets the hash value of the current instance.
105 * @return The hash value of the current instance
107 virtual int GetHashCode(void) const;
111 ///////////////////////////////////////////////////////////////
113 ///////////////////////////////////////////////////////////////
115 * Gets the name of an email attachment.
119 * @return The name of an email attachment
122 Tizen::Base::String GetName(void) const;
125 * Gets the file path of an email attachment.
129 * @return The file path of an email attachment
132 Tizen::Base::String GetFilePath(void) const;
135 * Gets the size of an email attachment.
139 * @return The size of an email attachment
141 int GetSize(void) const;
144 * Gets the inline-content status of an email attachment.
148 * @return @c true if an email attachment has inline-content(s), @n
150 * @see SetInlineContentStatus()
152 bool GetInlineContentStatus(void) const;
155 * Gets the DRM status of an email attachment.
159 * @return @c true if an email attachment contains DRM, @n
161 * @see SetDrmStatus()
163 bool GetDrmStatus(void) const;
166 * Gets the MIME type of an email attachment.
170 * @return The MIME type of an email attachment
173 Tizen::Base::String GetMimeType(void) const;
177 ///////////////////////////////////////////////////////////////
179 ///////////////////////////////////////////////////////////////
181 * Sets the name of an email attachment.
185 * @return An error code
186 * @param[in] name The name of the email attachment
187 * @exception E_SUCCESS The method is successful.
188 * @exception E_MAX_EXCEEDED The length of the name exceeds the maximum limit (Maximum 256 characters).
191 result SetName(const Tizen::Base::String& name);
194 * Sets the file path of an email attachment.
198 * @return An error code
199 * @param[in] filePath The file path of the attachment
200 * @exception E_SUCCESS The method is successful.
201 * @exception E_INVALID_ARG The length of the specified @c filePath is too long or @c 0.
202 * @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
205 result SetFilePath(const Tizen::Base::String& filePath);
208 * Sets the inline-content status of an email attachment.
212 * @param[in] status Set to @c true to change the inline-content status of the attachment to true, @n
214 * @see GetInlineContentStatus()
216 void SetInlineContentStatus(bool status);
219 * Sets the DRM status of an email attachment.
223 * @param[in] status Set to @c true to change the DRM status of the attachment to true, @n
225 * @see GetDrmStatus()
227 void SetDrmStatus(bool status);
230 * Sets the MIME type of an email attachment.
234 * @return An error code
235 * @param[in] type The MIME type of the attachment
236 * @exception E_SUCCESS The method is successful.
237 * @exception E_INVALID_ARG The length of the specified @c type is @c 0.
240 result SetMimeType(const Tizen::Base::String& type);
243 _EmailAttachmentImpl* __pImpl;
246 friend class _EmailAttachmentImpl;
247 }; // EmailAttachment
248 } } // Tizen::Messaging
250 #endif // _FMSG_EMAIL_ATTACHMENT_H_