Chat-O-Matic/application/views/InviteDialogue.h
Jaidyn Ann 37512144a1 Receive room invitations, allow user to accept or deny
A BAlert is used to inform the user of room invitations― InviteDialogue―
and to send their response directly to the protocol's looper.

Some new protocol messages were added (and older ones were moved around
to compenstate)― IM_ROOM_SEND_INVITE, IM_ROOM_INVITE_REFUSED,
IM_ROOM_INVITE_RECEIVED, IM_ROOM_INVITE_ACCEPT, and
IM_ROOM_INVITE_REFUSE.
2021-06-08 15:32:04 -05:00

34 lines
693 B
C++

/*
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#ifndef INVITE_DIALOGUE_H
#define INVITE_DIALOGUE_H
#include <Alert.h>
#include <Messenger.h>
class BBitmap;
// BAlert for quickly sending yes/no messages directly to a protocol looper
class InviteDialogue : public BAlert {
public:
InviteDialogue(BMessenger target, const char* title, const char* body,
BMessage* acceptMsg, BMessage* rejectMsg,
BBitmap* icon = NULL);
void MessageReceived(BMessage* msg);
status_t Go();
private:
BMessenger fMessenger;
BMessage* fAcceptMsg;
BMessage* fRejectMsg;
};
#endif // INVITE_DIALOGUE_H