diff options
author | Sehong Na <sehong.na@samsung.com> | 2014-05-31 13:20:25 +0900 |
---|---|---|
committer | Sehong Na <sehong.na@samsung.com> | 2014-05-31 13:20:25 +0900 |
commit | 59c401dcb6127a3ca74995bd3b3a7864a95fc418 (patch) | |
tree | 1d621db3eb1506f2fa42f1c38e143b90e1c3984f /mobile_src/Messaging/Email.h | |
download | wrt-plugins-tizen-tizen_2.3.tar.gz wrt-plugins-tizen-tizen_2.3.tar.bz2 wrt-plugins-tizen-tizen_2.3.zip |
Initialize Tizen 2.3submit/tizen_2.3/20140531.1146262.3a_releasetizen_2.3
Diffstat (limited to 'mobile_src/Messaging/Email.h')
-rwxr-xr-x | mobile_src/Messaging/Email.h | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/mobile_src/Messaging/Email.h b/mobile_src/Messaging/Email.h new file mode 100755 index 0000000..9b8773d --- /dev/null +++ b/mobile_src/Messaging/Email.h @@ -0,0 +1,148 @@ +// +// 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 EMAIL_H +#define EMAIL_H + +#include <string> +#include <dpl/mutex.h> +#include "IEmail.h" +#include "IMessagingTypes.h" +#include "EmailAccountInfo.h" + +#include "ScopedMail.h" +#include "ScopedMailbox.h" + +// The email service library +extern "C" { +//temporary solution for email-service problem (compilation break) +#ifndef NOW_REVERT +//#define NOW_REVERT +#endif +#ifndef SUPPORT_CONTACT_ON_SIM +//#define SUPPORT_CONTACT_ON_SIM +#endif +#ifndef _A_PROJECT_ +#define _A_PROJECT_ +#endif + +#ifndef _PREVIEW_IN_MAILIST +#define _PREVIEW_IN_MAILIST +#endif +} + +namespace DeviceAPI { +namespace Messaging { + +class Email : public IEmail +{ + public: + explicit Email(const std::string& id = std::string()); + + explicit Email(const std::string& id, int accountId); + + explicit Email( EmailAccountInfo& account); + + explicit Email(const FolderType folder); + + virtual ~Email(); + + virtual int send(); + + virtual void sendCancel(int handle); + + virtual int downloadBody(); + + virtual void downloadBodyCancel( int handle ); + + virtual int downloadAttachment(const IAttachmentPtr& attachment); + + virtual void downloadAttachmentCancel( int handle ); + + // implementation of interface of IMessage class + virtual void update(bool draftsOnly = false); + + virtual void readAllData(); + + virtual void moveToFolder(const FolderType newFolder); + + virtual void moveToFolder(const std::string& newFolder); + + virtual void copyToFolder(const FolderType newFolder); + + virtual void copyToFolder(const std::string& newFolder); + + virtual void remove(); + + virtual int removeFinishCheck(); + + virtual int getAccountID(); + + virtual int getUID(); + + virtual int isBodyDownloaded(); + + virtual bool hasAttachment(); + + private: + void create(); + + void create( EmailAccountInfo& account ); + + void reload(); + + void readHeader(); + + void readBody(); + + void readInfo(); + + void updateBody(); + + void updateRecipients(); + + void updateFrom(); + + void updateAttachments(); + + void updateSubject(); + + void updateReadStatus(); + + void updateIsRead(); + + void updateMessage(); + + void addMessageToDraft(); + + void loadDraftMessage(); + + void createSendMessage(); + + void updatePriority(); + + int getIntId() const; + + private: + DPL::Mutex m_updateMutex; + int m_accountId; + ScopedMail m_mail; + ScopedMailbox m_mailbox; //delete? +}; +} +} +#endif |