QXmpp Version:0.3.0
|
00001 /* 00002 * Copyright (C) 2008-2011 The QXmpp developers 00003 * 00004 * Author: 00005 * Alex Ermolov 00006 * 00007 * Source: 00008 * http://code.google.com/p/qxmpp 00009 * 00010 * This file is a part of QXmpp library. 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2.1 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Lesser General Public License for more details. 00021 * 00022 */ 00023 00024 #ifndef QXMPPACTIVITYITEM_H 00025 #define QXMPPACTIVITYITEM_H 00026 00027 #include "QXmppIq.h" 00028 00033 00034 class QXmppActivityItem : public QXmppIq 00035 { 00036 public: 00038 enum General { 00039 GeneralEmpty = -1, 00040 DoingChores, 00041 Drinking, 00042 Eating, 00043 Exercising, 00044 Grooming, 00045 HavingAppointment, 00046 Inactive, 00047 Relaxing, 00048 Talking, 00049 Traveling, 00050 Working 00051 }; 00053 enum Specific { 00054 SpecificEmpty = -1, 00055 BuyingGroceries, 00056 Cleaning, 00057 Cooking, 00058 DoingMaintenance, 00059 DoingTheDishes, 00060 DoingTheLaundry, 00061 Gardening, 00062 RunningAnErrand, 00063 WalkingTheDog, 00064 HavingABeer, 00065 HavingCoffee, 00066 HavingTea, 00067 HavingASnack, 00068 HavingBreakfast, 00069 HavingDinner, 00070 HavingLunch, 00071 Dancing, 00072 Hiking, 00073 Jogging, 00074 PlayingSports, 00075 Running, 00076 Skiing, 00077 Swimming, 00078 WorkingOut, 00079 AtTheSpa, 00080 BrushingTeeth, 00081 GettingAHaircut, 00082 Shaving, 00083 TakingABath, 00084 TakingAShower, 00085 DayOff, 00086 HangingOut, 00087 Hiding, 00088 OnVacation, 00089 Praying, 00090 ScheduledHoliday, 00091 Sleeping, 00092 Thinking, 00093 Fishing, 00094 Gaming, 00095 GoingOut, 00096 Partying, 00097 Reading, 00098 Rehearsing, 00099 Shopping, 00100 Smoking, 00101 Socializing, 00102 Sunbathing, 00103 WatchingTv, 00104 WatchingAMovie, 00105 InRealLife, 00106 OnThePhone, 00107 OnVideoPhone, 00108 Commuting, 00109 Cycling, 00110 Driving, 00111 InACar, 00112 OnABus, 00113 OnAPlane, 00114 OnATrain, 00115 OnATrip, 00116 Walking, 00117 Coding, 00118 InAMeeting, 00119 Studying, 00120 Writing, 00121 Other // any other activity (without further specification) not defined herein 00122 }; 00123 00124 QXmppActivityItem(); 00125 00126 QXmppActivityItem::General activityGeneral() const; 00127 void setActivityGeneral(General general); 00128 00129 QXmppActivityItem::Specific activitySpecific() const; 00130 void setActivitySpecific(Specific specific); 00131 00132 QString additionalSpecific() const; 00133 void setAdditionalSpecific(const QString&); 00134 00135 QString additionalSpecificNS() const; 00136 void setAdditionalSpecificNS(const QString&); 00137 00138 QString activityDetailed() const; 00139 void setActivityDetailed(const QString&); 00140 00141 QString activityDetailedNS() const; 00142 void setActivityDetailedNS(const QString&); 00143 00144 QString text() const; 00145 void setText(const QString&); 00146 00147 QString lang() const; 00148 void setLang(const QString&); 00149 00151 bool isStop() const; 00152 bool isAdditionalSpecific() const; 00153 bool isDetailed() const; 00154 00155 static bool isActivityItem(const QDomElement &element); 00156 00157 void parse(const QDomElement &activity); 00158 void toXml(QXmlStreamWriter *writer) const; 00160 00161 private: 00162 General m_actgen; 00163 Specific m_actspec; 00164 QString m_specadd; 00165 QString m_specaddns; 00166 QString m_detailed; 00167 QString m_detailedns; 00168 QString m_text; 00169 QString m_lang; 00170 bool m_bstop; 00171 bool m_bspecadd; 00172 bool m_bdetailed; 00173 }; 00174 00175 #endif