libqutim 0.2.80.1
|
00001 /**************************************************************************** 00002 ** 00003 ** qutIM - instant messenger 00004 ** 00005 ** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru> 00006 ** 00007 ***************************************************************************** 00008 ** 00009 ** $QUTIM_BEGIN_LICENSE$ 00010 ** This program is free software: you can redistribute it and/or modify 00011 ** it under the terms of the GNU General Public License as published by 00012 ** the Free Software Foundation, either version 3 of the License, or 00013 ** (at your option) any later version. 00014 ** 00015 ** This program is distributed in the hope that it will be useful, 00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 ** See the GNU General Public License for more details. 00019 ** 00020 ** You should have received a copy of the GNU General Public License 00021 ** along with this program. If not, see http://www.gnu.org/licenses/. 00022 ** $QUTIM_END_LICENSE$ 00023 ** 00024 ****************************************************************************/ 00025 00026 #ifndef METACONTACT_H 00027 #define METACONTACT_H 00028 00029 #include "contact.h" 00030 00031 namespace qutim_sdk_0_3 00032 { 00033 class MetaContactPrivate; 00034 00035 class LIBQUTIM_EXPORT MetaContact : public Contact 00036 { 00037 Q_OBJECT 00038 Q_DECLARE_PRIVATE(MetaContact) 00039 public: 00040 MetaContact(); 00041 virtual ~MetaContact(); 00042 00043 virtual bool isInList() const; 00044 virtual void setInList(bool inList); 00045 00046 virtual void addContact(Contact *contact); 00047 virtual void removeContact(Contact *contact); 00048 00049 virtual ChatUnitList lowerUnits(); 00050 // virtual const ChatUnit *getHistoryUnit() const; 00051 signals: 00052 void contactAdded(qutim_sdk_0_3::Contact *); 00053 void contactRemoved(qutim_sdk_0_3::Contact *); 00054 }; 00055 00056 class LIBQUTIM_EXPORT MetaContactChangeEvent : public QEvent 00057 { 00058 public: 00059 MetaContactChangeEvent(Contact *contact, MetaContact *oldMetaContact, MetaContact *newMetaContact); 00060 ~MetaContactChangeEvent(); 00061 static QEvent::Type eventType(); 00062 Contact *contact() const { return c; } 00063 MetaContact *oldMetaContact() const { return om; } 00064 MetaContact *newMetaContact() const { return nm; } 00065 private: 00066 Contact *c; 00067 MetaContact *om; 00068 MetaContact *nm; 00069 }; 00070 } 00071 00072 #endif // METACONTACT_H 00073