2006-02-16 20:37:36 +03:00
|
|
|
/*
|
2015-06-17 18:03:20 +03:00
|
|
|
* Copyright 2001-2015, Haiku.
|
2006-02-16 20:37:36 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Ingo Weinhold (bonefish@users.sf.net)
|
|
|
|
*/
|
2003-02-09 02:29:21 +03:00
|
|
|
#ifndef _ROSTER_PRIVATE_H
|
|
|
|
#define _ROSTER_PRIVATE_H
|
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
|
2003-02-09 02:29:21 +03:00
|
|
|
#include <Messenger.h>
|
|
|
|
#include <Roster.h>
|
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
|
2012-01-22 05:26:47 +04:00
|
|
|
const int32 kMsgAppServerRestarted = 'ASRe';
|
|
|
|
const int32 kMsgRestartAppServer = 'ReAS';
|
|
|
|
|
|
|
|
|
2003-02-09 02:29:21 +03:00
|
|
|
class BRoster::Private {
|
2006-02-16 20:37:36 +03:00
|
|
|
public:
|
|
|
|
Private() : fRoster(const_cast<BRoster*>(be_roster)) {}
|
|
|
|
Private(BRoster &roster) : fRoster(&roster) {}
|
|
|
|
Private(BRoster *roster) : fRoster(roster) {}
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
void SetTo(BMessenger mainMessenger, BMessenger mimeMessenger);
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
status_t SendTo(BMessage *message, BMessage *reply, bool mime);
|
|
|
|
bool IsMessengerValid(bool mime) const;
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
status_t ShutDown(bool reboot, bool confirm, bool synchronous)
|
|
|
|
{ return fRoster->_ShutDown(reboot, confirm, synchronous); }
|
2005-07-03 21:04:47 +04:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
// needed by BApplication
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
status_t AddApplication(const char *mimeSig, const entry_ref *ref,
|
|
|
|
uint32 flags, team_id team, thread_id thread,
|
|
|
|
port_id port, bool fullReg, uint32 *token,
|
|
|
|
team_id *otherTeam) const
|
|
|
|
{ return fRoster->_AddApplication(mimeSig, ref, flags, team, thread,
|
|
|
|
port, fullReg, token, otherTeam); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
status_t SetSignature(team_id team, const char *mimeSig) const
|
|
|
|
{ return fRoster->_SetSignature(team, mimeSig); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
status_t CompleteRegistration(team_id team, thread_id thread,
|
|
|
|
port_id port) const
|
|
|
|
{ return fRoster->_CompleteRegistration(team, thread, port); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-08-31 21:54:16 +04:00
|
|
|
status_t IsAppRegistered(const entry_ref *ref, team_id team,
|
|
|
|
uint32 token, bool *preRegistered, app_info *info) const
|
|
|
|
{ return fRoster->_IsAppRegistered(ref, team, token, preRegistered,
|
|
|
|
info); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2015-06-17 18:03:20 +03:00
|
|
|
void SetWithoutRegistrar(bool noRegistrar) const
|
|
|
|
{ fRoster->_SetWithoutRegistrar(noRegistrar); }
|
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
status_t RemoveApp(team_id team) const
|
|
|
|
{ return fRoster->_RemoveApp(team); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
// needed by GetRecentTester
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
void AddToRecentApps(const char *appSig) const
|
|
|
|
{ fRoster->_AddToRecentApps(appSig); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
void ClearRecentDocuments() const
|
|
|
|
{ fRoster->_ClearRecentDocuments(); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
void ClearRecentFolders() const
|
|
|
|
{ fRoster->_ClearRecentFolders(); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
void ClearRecentApps() const
|
|
|
|
{ fRoster->_ClearRecentApps(); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
void LoadRecentLists(const char *file) const
|
|
|
|
{ fRoster->_LoadRecentLists(file); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
void SaveRecentLists(const char *file) const
|
|
|
|
{ fRoster->_SaveRecentLists(file); }
|
2003-02-09 02:29:21 +03:00
|
|
|
|
2006-06-10 01:46:40 +04:00
|
|
|
// needed by the debug server
|
|
|
|
void ApplicationCrashed(team_id team) const
|
|
|
|
{ fRoster->_ApplicationCrashed(team); }
|
|
|
|
|
2007-01-18 20:45:08 +03:00
|
|
|
void UpdateActiveApp(team_id team) const
|
|
|
|
{ fRoster->_UpdateActiveApp(team); }
|
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
static void InitBeRoster();
|
|
|
|
static void DeleteBeRoster();
|
2005-01-25 18:20:11 +03:00
|
|
|
|
2006-02-16 20:37:36 +03:00
|
|
|
private:
|
|
|
|
BRoster *fRoster;
|
2003-02-09 02:29:21 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _ROSTER_PRIVATE_H
|