2021-05-26 07:48:25 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
|
|
|
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
2021-06-18 16:41:09 -05:00
|
|
|
* Copyright 2021, Jaidyn Levesque. All rights reserved.
|
2021-05-26 07:48:25 -05:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Andrea Anzani, andrea.anzani@gmail.com
|
|
|
|
* Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
|
2021-06-18 16:41:09 -05:00
|
|
|
* Jaidyn Levesque, jadedctrl@teknik.io
|
2021-05-26 07:48:25 -05:00
|
|
|
*/
|
|
|
|
#ifndef ROSTERWINDOW_H
|
|
|
|
#define ROSTERWINDOW_H
|
|
|
|
|
|
|
|
#include <Window.h>
|
|
|
|
|
2021-06-18 18:42:10 -05:00
|
|
|
#include "Server.h"
|
|
|
|
|
|
|
|
class BMenuField;
|
2021-05-26 07:48:25 -05:00
|
|
|
class RosterItem;
|
2021-06-18 16:41:09 -05:00
|
|
|
class RosterView;
|
2021-05-26 07:48:25 -05:00
|
|
|
|
|
|
|
|
|
|
|
/* A window with the a list of the user's contacts, will send a message to
|
|
|
|
the server with contact info, once a contact is selected. */
|
|
|
|
class RosterWindow : public BWindow {
|
|
|
|
public:
|
2021-06-08 21:43:30 -05:00
|
|
|
RosterWindow(const char* title, BMessage* selectMsg, BMessenger* messenger,
|
2021-06-18 18:42:10 -05:00
|
|
|
Server* server, bigtime_t instance = -1);
|
2021-05-26 07:48:25 -05:00
|
|
|
|
|
|
|
void MessageReceived(BMessage* message);
|
|
|
|
|
|
|
|
void UpdateListItem(RosterItem* item);
|
|
|
|
|
|
|
|
private:
|
2021-06-18 18:42:10 -05:00
|
|
|
BButton* fOkButton;
|
|
|
|
BMenuField* fAccountField;
|
|
|
|
AccountInstances fAccounts;
|
|
|
|
|
2021-05-26 07:48:25 -05:00
|
|
|
Server* fServer;
|
2021-06-18 18:42:10 -05:00
|
|
|
|
2021-06-18 16:41:09 -05:00
|
|
|
RosterView* fRosterView;
|
2021-05-26 07:48:25 -05:00
|
|
|
BMessenger* fTarget;
|
|
|
|
BMessage* fMessage;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ROSTERWINDOW_H
|