* Moved everything into the BPrivate namespace.
* Replaced the constant kRosterPortName by a function returning that name (we need different port names under BeOS and Haiku, and already at libbe init time). * The settings directory is obtained via find_directory() (critized by Axel :-). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10812 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -30,12 +30,15 @@
|
|||||||
#include <Errors.h>
|
#include <Errors.h>
|
||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
|
|
||||||
|
namespace BPrivate {
|
||||||
|
|
||||||
// names
|
// names
|
||||||
extern const char *kRegistrarSignature;
|
extern const char *kRegistrarSignature;
|
||||||
extern const char *kRosterThreadName;
|
extern const char *kRosterThreadName;
|
||||||
extern const char *kRosterPortName;
|
|
||||||
extern const char *kRAppLooperPortName;
|
extern const char *kRAppLooperPortName;
|
||||||
|
|
||||||
|
extern const char *get_roster_port_name();
|
||||||
|
|
||||||
// message constants
|
// message constants
|
||||||
enum {
|
enum {
|
||||||
// replies
|
// replies
|
||||||
@@ -159,5 +162,7 @@ struct flat_app_info {
|
|||||||
char ref_name[B_FILE_NAME_LENGTH + 1];
|
char ref_name[B_FILE_NAME_LENGTH + 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace BPrivate
|
||||||
|
|
||||||
#endif // REGISTRAR_DEFS_H
|
#endif // REGISTRAR_DEFS_H
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,25 @@
|
|||||||
// Description: API classes - registrar interface.
|
// Description: API classes - registrar interface.
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <AppMisc.h>
|
||||||
#include <RegistrarDefs.h>
|
#include <RegistrarDefs.h>
|
||||||
|
|
||||||
|
namespace BPrivate {
|
||||||
|
|
||||||
// names
|
// names
|
||||||
const char *kRegistrarSignature = "application/x-vnd.OBOS-Registrar";
|
const char *kRegistrarSignature = "application/x-vnd.haiku-registrar";
|
||||||
const char *kRosterThreadName = "_obos_roster_thread_";
|
const char *kRosterThreadName = "_roster_thread_";
|
||||||
const char *kRosterPortName = "_obos_roster_port_";
|
|
||||||
const char *kRAppLooperPortName = "rAppLooperPort";
|
const char *kRAppLooperPortName = "rAppLooperPort";
|
||||||
|
|
||||||
|
// get_roster_port_name
|
||||||
|
/*! \brief Returns the name of the main request port of the registrar (roster).
|
||||||
|
\return the name of the registrar request port.
|
||||||
|
*/
|
||||||
|
const char *
|
||||||
|
get_roster_port_name()
|
||||||
|
{
|
||||||
|
return (BPrivate::is_running_on_haiku()
|
||||||
|
? "_roster_port_" : "_obos_roster_port_");
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace BPrivate
|
||||||
|
|||||||
Reference in New Issue
Block a user