/* -*- 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_PACKET__INCLUDED #define HEADER__JABXPCOM_PACKET__INCLUDED #include "jabxpcom.h" // forward declarations namespace jabberoo { class Packet; }; class Jabber_ConstPacket_Wrapper : public jabIConstPacket { public: NS_DECL_ISUPPORTS NS_DECL_JABICONSTPACKET explicit Jabber_ConstPacket_Wrapper(const jabberoo::Packet *packet); virtual ~Jabber_ConstPacket_Wrapper(); /* additional members */ protected: inline const jabberoo::Packet *packet() const { return packet_; } inline void detach(const jabberoo::Packet *packet) { packet_ = packet; } private: const jabberoo::Packet *packet_; }; class Jabber_Packet_Wrapper : public jabIPacket { public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_JABIPACKET Jabber_Packet_Wrapper(nsISupports *obj, jabberoo::Packet &packet); virtual ~Jabber_Packet_Wrapper(); /* additional members */ private: nsISupports *obj_; jabberoo::Packet &packet_; }; #endif