summaryrefslogtreecommitdiff
path: root/mobile_src/Messaging/IEmail.h
diff options
context:
space:
mode:
Diffstat (limited to 'mobile_src/Messaging/IEmail.h')
-rwxr-xr-xmobile_src/Messaging/IEmail.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/mobile_src/Messaging/IEmail.h b/mobile_src/Messaging/IEmail.h
new file mode 100755
index 0000000..99c1b5b
--- /dev/null
+++ b/mobile_src/Messaging/IEmail.h
@@ -0,0 +1,89 @@
+//
+// Tizen Web Device API
+// Copyright (c) 2012 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.
+//
+
+#ifndef IEMAIL_H
+#define IEMAIL_H
+
+#include <string>
+#include <dpl/shared_ptr.h>
+#include "VirtualMessage.h"
+#include "IMessage.h"
+#include "Subject.h"
+#include "ToRecipient.h"
+#include "CcRecipient.h"
+#include "BccRecipient.h"
+#include "Attachments.h"
+#include "EmailAccountInfo.h"
+
+namespace DeviceAPI {
+namespace Messaging {
+
+class IEmail : virtual public IMessage,
+ public CcRecipient,
+ public BccRecipient,
+ public Attachments
+{
+ public:
+ explicit IEmail(const std::string& id = "");
+
+ virtual ~IEmail();
+
+ IEmail & operator <<(const VirtualMessage& msg);
+
+ void setHtmlBody(const std::string& htmlBody = "")
+ {
+ m_htmlBody = htmlBody;
+ }
+
+ std::string getHtmlBody() const
+ {
+ return m_htmlBody;
+ }
+
+ void setEmailAccount(const EmailAccountInfo& account)
+ {
+ m_emailAccount = account;
+ }
+
+ EmailAccountInfo getEmailAccount()
+ {
+ return m_emailAccount;
+ }
+
+ virtual int getAccountID() = 0;
+ virtual int getUID() = 0;
+ virtual int isBodyDownloaded() = 0;
+
+ virtual int downloadBody() = 0;
+ virtual void downloadBodyCancel(int handle ) = 0;
+
+ virtual int downloadAttachment(const IAttachmentPtr& attachment) = 0;
+ virtual void downloadAttachmentCancel(int handle ) = 0;
+
+ virtual int removeFinishCheck() = 0;
+ virtual bool hasAttachment() = 0;
+
+ private:
+ std::string m_htmlBody; //html body for Email.
+ EmailAccountInfo m_emailAccount;
+};
+
+typedef DPL::SharedPtr<IEmail> IEmailPtr;
+}
+}
+#endif // IEMAIL_H
+