* 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:
Ingo Weinhold 2005-01-18 01:06:30 +00:00
parent 566155b85f
commit 0ffb21a672
2 changed files with 23 additions and 4 deletions
headers/private/app
src/kits/app

@ -30,12 +30,15 @@
#include <Errors.h>
#include <Roster.h>
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

@ -24,11 +24,25 @@
// Description: API classes - registrar interface.
//------------------------------------------------------------------------------
#include <AppMisc.h>
#include <RegistrarDefs.h>
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