// // 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 CONVERSATION_H #define CONVERSATION_H #include #include #include #include #include "IConversation.h" extern "C" { #include #include #include } namespace DeviceAPI { namespace Messaging { class Conversation : public IConversation { public: Conversation(); Conversation(unsigned int threadId, MessageType msgType); Conversation(unsigned int threadIndex); // msg thread with index of all thread view for test Conversation(std::string msgId, MessageType msgType); // Conversation(msg_thread_view_t msg_thread); // msg thread with thread data Conversation(msg_struct_t msg_thread); // msg thread with thread data ~Conversation(); // getter int getConvId(); unsigned short getType(); time_t getTime(); unsigned long getMessageCount(); unsigned long getUnreadMessages(); std::string getPreview(); std::string getSubject(); bool getRead(); std::string getFrom(); std::vector getTo(); std::vector getCC(); std::vector getBCC(); int getLastMessageId(); bool getResult(); int getDirection(); bool makeConversationFromMsgId(unsigned int msgId, MessageType msgType); void makeConversationFromThreadIndex(unsigned int threadIndex); // void makeConversationFromThread(msg_thread_view_t msg_thread); void makeConversationFromThread(msg_struct_t msg_thread); bool makeConversationFromEmailThreadId(unsigned int emailTreadId); bool makeEmptyConversation(unsigned int threadIndex, MessageType msgType); void setConvId(const int id); #if 0 // setter void setId(unsigned int id); void setType(unsigned short type); void setTime(time_t* time); void setMessageCount(unsigned long messageCount); void setUnreadMessages(unsigned long unreadMessages); void setPreview(unsigned long unreadMessages); void setRead(bool read); void setFrom(std::string from); void setTo(std::vector to); void setCC(std::vector cc); void setBCC(std::vector bcc); void setLastMessageId(unsigned int id); #endif private: int m_Id; unsigned short int m_type; time_t m_time; unsigned long m_messageCount; unsigned long m_unreadMessages; std::string m_preview; bool m_read; std::string m_from; std::string m_subject; std::vector m_to; std::vector m_cc; std::vector m_bcc; int m_lastMessageId; int m_direction; bool m_result; }; } } #endif