xref: /haiku/headers/private/app/RosterPrivate.h (revision 9ecf9d1c1d4888d341a6eac72112c72d1ae3a4cb)
1 /*
2  * Copyright 2001-2006, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Ingo Weinhold (bonefish@users.sf.net)
7  */
8 #ifndef _ROSTER_PRIVATE_H
9 #define _ROSTER_PRIVATE_H
10 
11 
12 #include <Messenger.h>
13 #include <Roster.h>
14 
15 
16 class BRoster::Private {
17 	public:
18 		Private() : fRoster(const_cast<BRoster*>(be_roster)) {}
19 		Private(BRoster &roster) : fRoster(&roster) {}
20 		Private(BRoster *roster) : fRoster(roster) {}
21 
22 		void SetTo(BMessenger mainMessenger, BMessenger mimeMessenger);
23 
24 		status_t SendTo(BMessage *message, BMessage *reply, bool mime);
25 		bool IsMessengerValid(bool mime) const;
26 
27 		status_t ShutDown(bool reboot, bool confirm, bool synchronous)
28 			{ return fRoster->_ShutDown(reboot, confirm, synchronous); }
29 
30 		// needed by BApplication
31 
32 		status_t AddApplication(const char *mimeSig, const entry_ref *ref,
33 					uint32 flags, team_id team, thread_id thread,
34 					port_id port, bool fullReg, uint32 *token,
35 					team_id *otherTeam) const
36 			{ return fRoster->_AddApplication(mimeSig, ref, flags, team, thread,
37 					port, fullReg, token, otherTeam); }
38 
39 		status_t SetSignature(team_id team, const char *mimeSig) const
40 			{ return fRoster->_SetSignature(team, mimeSig); }
41 
42 		status_t CompleteRegistration(team_id team, thread_id thread,
43 					port_id port) const
44 			{ return fRoster->_CompleteRegistration(team, thread, port); }
45 
46 		bool IsAppPreRegistered(const entry_ref *ref, team_id team,
47 					app_info *info) const
48 			{ return fRoster->_IsAppPreRegistered(ref, team, info); }
49 
50 		status_t RemoveApp(team_id team) const
51 			{ return fRoster->_RemoveApp(team); }
52 
53 		// needed by GetRecentTester
54 
55 		void AddToRecentApps(const char *appSig) const
56 			{ fRoster->_AddToRecentApps(appSig); }
57 
58 		void ClearRecentDocuments() const
59 			{ fRoster->_ClearRecentDocuments(); }
60 
61 		void ClearRecentFolders() const
62 			{ fRoster->_ClearRecentFolders(); }
63 
64 		void ClearRecentApps() const
65 			{ fRoster->_ClearRecentApps(); }
66 
67 		void LoadRecentLists(const char *file) const
68 			{ fRoster->_LoadRecentLists(file); }
69 
70 		void SaveRecentLists(const char *file) const
71 			{ fRoster->_SaveRecentLists(file); }
72 
73 		// needed by the debug server
74 		void ApplicationCrashed(team_id team) const
75 			{ fRoster->_ApplicationCrashed(team); }
76 
77 		static void InitBeRoster();
78 		static void DeleteBeRoster();
79 
80 	private:
81 		BRoster	*fRoster;
82 };
83 
84 #endif	// _ROSTER_PRIVATE_H
85