summaryrefslogtreecommitdiff
path: root/src/resources/buddylist.h
diff options
context:
space:
mode:
authorMateusz Kaduk <mateusz.kaduk@gmail.com>2005-05-15 09:17:40 +0000
committerMateusz Kaduk <mateusz.kaduk@gmail.com>2005-05-15 09:17:40 +0000
commit13deabf8b93a2a6307978d9f49ad8fde5dbefdfd (patch)
treee21a23d1e6606ca86fb5629cd4048d62e560191c /src/resources/buddylist.h
parent0632377e8b2e63f965b30ac89a9e2dca819735ef (diff)
downloadmana-client-13deabf8b93a2a6307978d9f49ad8fde5dbefdfd.tar.gz
mana-client-13deabf8b93a2a6307978d9f49ad8fde5dbefdfd.tar.bz2
mana-client-13deabf8b93a2a6307978d9f49ad8fde5dbefdfd.tar.xz
mana-client-13deabf8b93a2a6307978d9f49ad8fde5dbefdfd.zip
Using guichan ListModel
Diffstat (limited to 'src/resources/buddylist.h')
-rw-r--r--src/resources/buddylist.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/resources/buddylist.h b/src/resources/buddylist.h
index cb798f1e..704ce450 100644
--- a/src/resources/buddylist.h
+++ b/src/resources/buddylist.h
@@ -23,10 +23,11 @@
#ifndef _TMW_BUDDYLIST_H
#define _TMW_BUDDYLIST_H
+#include <guichan.hpp>
#include <list>
#include <string>
-class BuddyList {
+class BuddyList : public gcn::ListModel {
public:
/**
* Constructor
@@ -36,27 +37,27 @@ class BuddyList {
/**
* Destructor
*/
- ~BuddyList();
+ virtual ~BuddyList();
/**
- * Adds 'buddy' to the list
+ * Adds buddy to the list
*/
bool addBuddy(const std::string buddy);
/**
- * Removes 'buddy' from the list
+ * Removes buddy from the list
*/
bool removeBuddy(const std::string buddy);
/**
* Returns the number of buddy on the list
*/
- int getBuddyNumber(void);
+ int getNumberOfElements(void);
/**
* Returns the buddy of the number or null
*/
- std::string getBuddy(int number);
+ std::string getElementAt(int number);
private:
std::list<std::string> buddylist; /**< Buddy list */