1 /**
2 * Whiteboard session manager
3 * Buddy list management facility
4 *
5 * Authors:
6 * David Yip <yipdw@rose-hulman.edu>
7 *
8 * Copyright (c) 2005 Authors
9 *
10 * Released under GNU GPL, read the file 'COPYING' for more information
11 */
14 #include <sigc++/sigc++.h>
15 #include <set>
17 #include "jabber_whiteboard/typedefs.h"
18 #include "jabber_whiteboard/buddy-list-manager.h"
20 namespace Inkscape {
22 namespace Whiteboard {
24 BuddyListManager::BuddyListManager() { }
25 BuddyListManager::~BuddyListManager() { }
27 void
28 BuddyListManager::addInsertListener(BuddyListListener listener)
29 {
30 this->_sig_insert.connect(listener);
31 }
33 void
34 BuddyListManager::addEraseListener(BuddyListListener listener)
35 {
36 this->_sig_erase.connect(listener);
37 }
39 void
40 BuddyListManager::insert(std::string& jid)
41 {
42 this->_bl.insert(jid);
43 this->_sig_insert.emit(jid);
44 }
46 void
47 BuddyListManager::erase(std::string& jid)
48 {
49 this->_bl.erase(jid);
50 this->_sig_erase.emit(jid);
51 }
53 BuddyList::iterator
54 BuddyListManager::begin()
55 {
56 return this->_bl.begin();
57 }
59 BuddyList::iterator
60 BuddyListManager::end()
61 {
62 return this->_bl.end();
63 }
65 BuddyList&
66 BuddyListManager::getList()
67 {
68 return this->_bl;
69 }
71 }
73 }
75 /*
76 Local Variables:
77 mode:c++
78 c-file-style:"stroustrup"
79 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
80 indent-tabs-mode:nil
81 fill-column:99
82 End:
83 */
84 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :