diff --git a/headers/private/app/RegistrarDefs.h b/headers/private/app/RegistrarDefs.h index b793e7ca69..2087fdf912 100644 --- a/headers/private/app/RegistrarDefs.h +++ b/headers/private/app/RegistrarDefs.h @@ -30,12 +30,15 @@ #include #include +namespace BPrivate { + // names extern const char *kRegistrarSignature; extern const char *kRosterThreadName; -extern const char *kRosterPortName; extern const char *kRAppLooperPortName; +extern const char *get_roster_port_name(); + // message constants enum { // replies @@ -159,5 +162,7 @@ struct flat_app_info { char ref_name[B_FILE_NAME_LENGTH + 1]; }; +} // namespace BPrivate + #endif // REGISTRAR_DEFS_H diff --git a/src/kits/app/RegistrarDefs.cpp b/src/kits/app/RegistrarDefs.cpp index 1ef1aacf41..5481febfe5 100644 --- a/src/kits/app/RegistrarDefs.cpp +++ b/src/kits/app/RegistrarDefs.cpp @@ -24,11 +24,25 @@ // Description: API classes - registrar interface. //------------------------------------------------------------------------------ +#include #include +namespace BPrivate { + // names -const char *kRegistrarSignature = "application/x-vnd.OBOS-Registrar"; -const char *kRosterThreadName = "_obos_roster_thread_"; -const char *kRosterPortName = "_obos_roster_port_"; +const char *kRegistrarSignature = "application/x-vnd.haiku-registrar"; +const char *kRosterThreadName = "_roster_thread_"; 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