/* -*- C++ -*- * Copyright (C) 2001-2003, Christof Meerwald * http://JabXPCOM.sunsite.dk */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public License * as published by the Free Software Foundation; version 2 dated June, * 1991. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef HEADER__JABXPCOM_PRESENCE__INCLUDED #define HEADER__JABXPCOM_PRESENCE__INCLUDED #include "jabxpcom-packet.h" #include "jabxpcom.h" #include class Jabber_Presence_Wrapper : public jabIPresence, public Jabber_ConstPacket_Wrapper { public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_JABIPRESENCE NS_FORWARD_JABICONSTPACKET(Jabber_ConstPacket_Wrapper::) explicit Jabber_Presence_Wrapper(const jabberoo::Presence *presence); explicit Jabber_Presence_Wrapper(const char *jid, PresenceType ptype, ShowType stype = jabIPresence::stInvalid, const char *status = "", PRInt32 priority = 0); virtual ~Jabber_Presence_Wrapper(); /* additional members */ void detach(); protected: inline void detach(const jabberoo::Presence *presence) { presence_ = presence; Jabber_ConstPacket_Wrapper::detach(presence); } private: const jabberoo::Presence *presence_; bool managed_object_; }; #endif