1 /* 2 * %kadu copyright begin% 3 * Copyright 2014 Bartosz Brachaczek (b.brachaczek@gmail.com) 4 * Copyright 2011, 2012, 2013, 2014 Rafał Przemysław Malinowski (rafal.przemyslaw.malinowski@gmail.com) 5 * %kadu copyright end% 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation; either version 2 of 10 * the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef MESSAGE_H 22 #define MESSAGE_H 23 24 #include <QtCore/QDateTime> 25 26 #include "message/message-common.h" 27 #include "message/message-shared.h" 28 #include "storage/shared-base.h" 29 30 #include "exports.h" 31 32 class Chat; 33 class Contact; 34 class MessageShared; 35 class NormalizedHtmlString; 36 37 class KADUAPI Message : public SharedBase<MessageShared> 38 { 39 KaduSharedBaseClass(Message) 40 41 public: 42 static Message null; 43 44 Message(); 45 Message(MessageShared *data); 46 explicit Message(QObject *data); 47 Message(const Message ©); 48 virtual ~Message(); 49 50 KaduSharedBase_PropertyCRW(Chat, messageChat, MessageChat) 51 KaduSharedBase_PropertyCRW(Contact, messageSender, MessageSender) 52 KaduSharedBase_PropertyCRW(NormalizedHtmlString, content, Content) 53 KaduSharedBase_PropertyCRW(QDateTime, receiveDate, ReceiveDate) 54 KaduSharedBase_PropertyCRW(QDateTime, sendDate, SendDate) 55 KaduSharedBase_Property(MessageStatus, status, Status) 56 KaduSharedBase_Property(MessageType, type, Type) 57 KaduSharedBase_PropertyCRW(QString, id, Id) 58 59 }; 60 61 Q_DECLARE_METATYPE(Message) 62 63 #endif // MESSAGE_H 64