2010-05-07 04:47:10 -05:00
|
|
|
/*
|
2011-12-03 16:38:03 -06:00
|
|
|
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
2012-05-01 16:09:56 -05:00
|
|
|
* Copyright 2012, Dario Casalinuovo. All rights reserved.
|
2010-05-07 04:47:10 -05:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _CONTACT_LINKER_H_
|
|
|
|
#define _CONTACT_LINKER_H_
|
|
|
|
|
|
|
|
#include <String.h>
|
|
|
|
#include <Message.h>
|
|
|
|
#include <Messenger.h>
|
|
|
|
|
|
|
|
#include "Notifier.h"
|
|
|
|
#include "CayaConstants.h"
|
|
|
|
|
|
|
|
class BBitmap;
|
|
|
|
|
|
|
|
class ChatWindow;
|
|
|
|
class ContactPopUp;
|
2010-05-16 16:02:50 -05:00
|
|
|
class ProtocolLooper;
|
2010-05-07 04:47:10 -05:00
|
|
|
class RosterItem;
|
|
|
|
|
|
|
|
class ContactLinker : public Notifier {
|
|
|
|
public:
|
|
|
|
ContactLinker(BString id, BMessenger msgn);
|
|
|
|
|
|
|
|
ChatWindow* GetChatWindow();
|
|
|
|
void DeleteWindow();
|
|
|
|
|
|
|
|
void ShowWindow();
|
|
|
|
void HideWindow();
|
|
|
|
|
|
|
|
void ShowPopUp(BPoint where);
|
|
|
|
void DeletePopUp();
|
|
|
|
void HidePopUp();
|
|
|
|
|
2012-03-07 13:22:09 -06:00
|
|
|
RosterItem* GetRosterItem() const;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2012-03-07 13:22:09 -06:00
|
|
|
BString GetId() const;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2010-05-16 16:02:50 -05:00
|
|
|
BMessenger Messenger() const;
|
|
|
|
void SetMessenger(BMessenger messenger);
|
|
|
|
|
|
|
|
ProtocolLooper* GetProtocolLooper() const;
|
|
|
|
void SetProtocolLooper(ProtocolLooper* looper);
|
2012-05-01 14:48:15 -05:00
|
|
|
BBitmap* ProtocolBitmap() const;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2012-03-07 13:22:09 -06:00
|
|
|
BString GetName() const;
|
|
|
|
BBitmap* AvatarBitmap() const;
|
|
|
|
CayaStatus GetNotifyStatus() const;
|
|
|
|
BString GetNotifyPersonalStatus() const;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
void SetNotifyName(BString name);
|
|
|
|
void SetNotifyAvatarBitmap(BBitmap* bitmap);
|
|
|
|
void SetNotifyStatus(CayaStatus status);
|
|
|
|
void SetNotifyPersonalStatus(BString personalStatus);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateChatWindow();
|
|
|
|
|
|
|
|
RosterItem* fRosterItem;
|
|
|
|
ChatWindow* fChatWindow;
|
|
|
|
BMessenger fMessenger;
|
2010-05-16 16:02:50 -05:00
|
|
|
ProtocolLooper* fLooper;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
BString fID;
|
2010-05-16 16:02:50 -05:00
|
|
|
bigtime_t fInstance;
|
2010-05-07 04:47:10 -05:00
|
|
|
BString fName;
|
|
|
|
BString fPersonalStatus;
|
|
|
|
BBitmap* fAvatarBitmap;
|
|
|
|
CayaStatus fStatus;
|
|
|
|
ContactPopUp* fPopUp;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _CONTACT_LINKER_H_
|