Chat-O-Matic/application/StatusManager.h

38 lines
853 B
C
Raw Permalink Normal View History

/*
2011-12-03 16:38:03 -06:00
* Copyright 2009-2011, Pier Luigi Fiorini. All rights reserved.
* Distributed under the terms of the MIT License.
*/
2021-08-16 10:40:18 -05:00
#ifndef _STATUS_MANAGER_H
#define _STATUS_MANAGER_H
#include <Messenger.h>
#include "Notifier.h"
2021-08-19 17:04:33 -05:00
#include "UserStatus.h"
2021-08-16 10:40:18 -05:00
class StatusManager : public Notifier {
public:
2021-08-16 10:40:18 -05:00
static StatusManager* Get();
void SetNickname(BString nick, int64 instance = -1);
2021-06-20 12:44:20 -05:00
UserStatus Status() const;
void SetStatus(UserStatus status, int64 instance = -1);
void SetStatus(UserStatus status, const char* str,
int64 instance = -1);
void SetReplicantMessenger(BMessenger* messenger);
2021-06-20 12:44:20 -05:00
void ReplicantStatusNotify(UserStatus status,
bool wait = false);
private:
2021-08-16 10:40:18 -05:00
StatusManager();
~StatusManager();
2021-06-20 12:44:20 -05:00
UserStatus fStatus;
BMessenger* fReplicantMessenger;
};
2021-08-16 10:40:18 -05:00
#endif // _STATUS_MANAGER_H