2021-06-19 18:25:58 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
|
|
|
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
|
|
|
|
* Copyright 2021, Jaidyn Levesque. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Andrea Anzani, andrea.anzani@gmail.com
|
|
|
|
* Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
|
|
|
|
* Jaidyn Levesque, jadedctrl@teknik.io
|
|
|
|
*/
|
|
|
|
#ifndef _ROSTER_EDITWINDOW_H
|
|
|
|
#define _ROSTER_EDIT_WINDOW_H
|
|
|
|
|
|
|
|
#include <Window.h>
|
|
|
|
|
|
|
|
#include "Server.h"
|
|
|
|
|
|
|
|
class BMenuField;
|
|
|
|
class RosterItem;
|
|
|
|
class RosterView;
|
2021-06-19 22:03:02 -05:00
|
|
|
class TemplateWindow;
|
2021-06-19 18:25:58 -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 RosterEditWindow : public BWindow {
|
|
|
|
public:
|
2021-06-19 22:03:02 -05:00
|
|
|
RosterEditWindow(Server* server);
|
|
|
|
~RosterEditWindow();
|
|
|
|
static RosterEditWindow* Get(Server* server);
|
|
|
|
static bool Check();
|
2021-06-19 18:25:58 -05:00
|
|
|
|
2021-06-19 22:03:02 -05:00
|
|
|
void MessageReceived(BMessage* message);
|
|
|
|
void UpdateListItem(RosterItem* item);
|
2021-06-19 18:25:58 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
BMenuField* fAccountField;
|
|
|
|
AccountInstances fAccounts;
|
|
|
|
|
2021-06-19 22:03:02 -05:00
|
|
|
BString fEditingUser;
|
|
|
|
TemplateWindow* fEditingWindow;
|
|
|
|
|
2021-06-19 18:25:58 -05:00
|
|
|
Server* fServer;
|
|
|
|
RosterView* fRosterView;
|
2021-06-19 22:03:02 -05:00
|
|
|
|
|
|
|
static RosterEditWindow* fInstance;
|
2021-06-19 18:25:58 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _ROSTER_EDIT_WINDOW_H
|