RosterView.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright 2009-2011, Andrea Anzani. All rights reserved.
  3. * Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
  4. * Copyright 2021, Jaidyn Levesque. All rights reserved.
  5. * Distributed under the terms of the MIT License.
  6. *
  7. * Authors:
  8. * Andrea Anzani, andrea.anzani@gmail.com
  9. * Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
  10. * Jaidyn Levesque, jadedctrl@teknik.io
  11. */
  12. #ifndef _ROSTER_VIEW_H
  13. #define _ROSTER_VIEW_H
  14. #include <GroupView.h>
  15. #include "Server.h"
  16. class BStringItem;
  17. class BTextControl;
  18. class RosterItem;
  19. class RosterListView;
  20. class Server;
  21. class RosterView : public BGroupView {
  22. public:
  23. RosterView(const char* title, Server* server, bigtime_t account = -1);
  24. void MessageReceived(BMessage* message);
  25. void ImMessage(BMessage* msg);
  26. void AttachedToWindow();
  27. void SetInvocationMessage(BMessage* msg);
  28. void SetAccount(bigtime_t instance_id);
  29. void SetManualString(const char* text) { fManualStr = text; }
  30. int64 GetAccount() { return fAccount; }
  31. BTextControl* SearchBox() { return fSearchBox; }
  32. void UpdateListItem(RosterItem* item);
  33. RosterListView* ListView();
  34. private:
  35. RosterMap _RosterMap();
  36. Server* fServer;
  37. RosterListView* fListView;
  38. BTextControl* fSearchBox;
  39. bigtime_t fAccount;
  40. BStringItem* fManualItem;
  41. BString fManualStr;
  42. };
  43. #endif // _ROSTER_VIEW_H