00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <config.h>
00025 #include "dbus-misc.h"
00026 #include "dbus-internals.h"
00027 #include "dbus-string.h"
00028
00072 char*
00073 dbus_get_local_machine_id (void)
00074 {
00075 DBusString uuid;
00076 char *s;
00077
00078 s = NULL;
00079 if (!_dbus_string_init (&uuid))
00080 return NULL;
00081
00082 if (!_dbus_get_local_machine_uuid_encoded (&uuid) ||
00083 !_dbus_string_steal_data (&uuid, &s))
00084 {
00085 _dbus_string_free (&uuid);
00086 return NULL;
00087 }
00088 else
00089 {
00090 _dbus_string_free (&uuid);
00091 return s;
00092 }
00093
00094 }
00095
00097
00098 #ifdef DBUS_BUILD_TESTS
00099
00100 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00101
00102 #include "dbus-test.h"
00103 #include <stdlib.h>
00104
00105
00106 dbus_bool_t
00107 _dbus_misc_test (void)
00108 {
00109
00110 return TRUE;
00111 }
00112
00113 #endif
00114
00115 #endif