• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Event.h

Go to the documentation of this file.
00001 /* Copyright (C) 2006 by Marc Maurer <uwog@uwog.net>
00002  *
00003  * This program is free software; you can redistribute it and/or
00004  * modify it under the terms of the GNU General Public License
00005  * as published by the Free Software Foundation; either version 2
00006  * of the License, or (at your option) any later version.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00016  * 02110-1301 USA.
00017  */
00018 
00019 #ifndef __EVENT_H__
00020 #define __EVENT_H__
00021 
00022 #include <vector>
00023 #include <account/xp/Buddy.h>
00024 #include <packet/xp/EventPacket.h>
00025 
00026 class Event : public EventPacket
00027 {
00028 public:
00029     DECLARE_ABSTRACT_PACKET(Event);
00030 
00031     Event()
00032         : m_bBroadcast(false)
00033     {
00034     }
00035 
00036     virtual ~Event()
00037     {
00038     }
00039 
00040     const std::vector<BuddyPtr>&        getRecipients() const
00041         { return m_vRecipients; }
00042 
00043     void                                setRecipients(std::vector<BuddyPtr>& vRecipients)
00044     {
00045             m_vRecipients = vRecipients;
00046     }
00047 
00048     void                                addRecipient(BuddyPtr pBuddy)
00049     {
00050             UT_return_if_fail(pBuddy);
00051             m_vRecipients.push_back(pBuddy);
00052     }
00053 
00054     void                                setBroadcast(bool bBroadcast)
00055         { m_bBroadcast = bBroadcast; }
00056     bool                                isBroadcast() const
00057         { return m_bBroadcast; }
00058 
00059 private:
00060 
00061     std::vector<BuddyPtr>          m_vRecipients;
00062     bool                            m_bBroadcast;
00063 };
00064 
00065 #endif /* __EVENT_H__ */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1