xref: /haiku/headers/private/app/RosterPrivate.h (revision d5cd5d63ff0ad395989db6cf4841a64d5b545d1d)
1 //----------------------------------------------------------------------
2 //  This software is part of the OpenBeOS distribution and is covered
3 //  by the OpenBeOS license.
4 //---------------------------------------------------------------------
5 
6 #ifndef _ROSTER_PRIVATE_H
7 #define _ROSTER_PRIVATE_H
8 
9 #include <Messenger.h>
10 #include <Roster.h>
11 
12 class BRoster::Private {
13 public:
14 	Private() : fRoster(const_cast<BRoster*>(be_roster)) {}
15 	Private(BRoster &roster) : fRoster(&roster) {}
16 	Private(BRoster *roster) : fRoster(roster) {}
17 
18 	void SetTo(BMessenger mainMessenger, BMessenger mimeMessenger);
19 
20 	status_t SendTo(BMessage *message, BMessage *reply, bool mime);
21 	bool IsMessengerValid(bool mime) const;
22 
23 	// needed by BApplication
24 
25 	status_t AddApplication(const char *mimeSig, const entry_ref *ref,
26 							uint32 flags, team_id team, thread_id thread,
27 							port_id port, bool fullReg, uint32 *token,
28 							team_id *otherTeam) const
29 		{ return fRoster->AddApplication(mimeSig, ref, flags, team, thread,
30 										 port, fullReg, token, otherTeam); }
31 
32 	status_t SetSignature(team_id team, const char *mimeSig) const
33 		{ return fRoster->SetSignature(team, mimeSig); }
34 
35 	status_t CompleteRegistration(team_id team, thread_id thread,
36 								  port_id port) const
37 		{ return fRoster->CompleteRegistration(team, thread, port); }
38 
39 	bool IsAppPreRegistered(const entry_ref *ref, team_id team,
40 							app_info *info) const
41 		{ return fRoster->IsAppPreRegistered(ref, team, info); }
42 
43 	status_t RemoveApp(team_id team) const
44 		{ return fRoster->RemoveApp(team); }
45 
46 	// needed by GetRecentTester
47 
48 	void AddToRecentApps(const char *appSig) const
49 		{ fRoster->AddToRecentApps(appSig); }
50 
51 	void ClearRecentDocuments() const
52 		{ fRoster->ClearRecentDocuments(); }
53 
54 	void ClearRecentFolders() const
55 		{ fRoster->ClearRecentFolders(); }
56 
57 	void ClearRecentApps() const
58 		{ fRoster->ClearRecentApps(); }
59 
60 	void LoadRecentLists(const char *file) const
61 		{ fRoster->LoadRecentLists(file); }
62 
63 	void SaveRecentLists(const char *file) const
64 		{ fRoster->SaveRecentLists(file); }
65 
66 private:
67 	BRoster	*fRoster;
68 };
69 
70 extern "C" int	_init_roster_();
71 extern "C" int	_delete_roster_();
72 
73 #endif	// _ROSTER_PRIVATE_H
74