void init_constants(ObjectHandle exports) { Handle<Object> constants = Object::New(); exports->Set(String::NewSymbol("constants"), constants); DEFINE_CONSTANT(constants, DBUS_BUS_SESSION); DEFINE_CONSTANT(constants, DBUS_BUS_SYSTEM); DEFINE_CONSTANT(constants, DBUS_BUS_STARTER); DEFINE_CONSTANT(constants, DBUS_WATCH_READABLE); DEFINE_CONSTANT(constants, DBUS_WATCH_WRITABLE); DEFINE_CONSTANT(constants, DBUS_WATCH_ERROR); DEFINE_CONSTANT(constants, DBUS_WATCH_HANGUP); DEFINE_CONSTANT(constants, DBUS_MESSAGE_TYPE_INVALID); DEFINE_CONSTANT(constants, DBUS_MESSAGE_TYPE_METHOD_CALL); DEFINE_CONSTANT(constants, DBUS_MESSAGE_TYPE_METHOD_RETURN); DEFINE_CONSTANT(constants, DBUS_MESSAGE_TYPE_ERROR); DEFINE_CONSTANT(constants, DBUS_MESSAGE_TYPE_SIGNAL); DEFINE_CONSTANT(constants, DBUS_SERVICE_DBUS); DEFINE_CONSTANT(constants, DBUS_PATH_DBUS); DEFINE_CONSTANT(constants, DBUS_INTERFACE_DBUS); DEFINE_CONSTANT(constants, DBUS_INTERFACE_INTROSPECTABLE); DEFINE_CONSTANT(constants, DBUS_INTERFACE_PROPERTIES); DEFINE_CONSTANT(constants, DBUS_INTERFACE_PEER); DEFINE_CONSTANT(constants, DBUS_DISPATCH_DATA_REMAINS); DEFINE_CONSTANT(constants, DBUS_DISPATCH_COMPLETE); DEFINE_CONSTANT(constants, DBUS_DISPATCH_NEED_MEMORY); }
extern const char* __progname; const char* kCommandName = __progname; struct DirectoryConstantEntry { const char* string; path_base_directory constant; const char* description; }; #define DEFINE_CONSTANT(constant, description) \ { #constant, constant, description } static const DirectoryConstantEntry kDirectoryConstants[] = { DEFINE_CONSTANT(B_FIND_PATH_INSTALLATION_LOCATION_DIRECTORY, "the installation location"), DEFINE_CONSTANT(B_FIND_PATH_ADD_ONS_DIRECTORY, "the add-ons directory"), DEFINE_CONSTANT(B_FIND_PATH_APPS_DIRECTORY, "the applications directory"), DEFINE_CONSTANT(B_FIND_PATH_BIN_DIRECTORY, "the command line programs directory"), DEFINE_CONSTANT(B_FIND_PATH_BOOT_DIRECTORY, "the boot data directory"), DEFINE_CONSTANT(B_FIND_PATH_CACHE_DIRECTORY, "the cache directory"), DEFINE_CONSTANT(B_FIND_PATH_DATA_DIRECTORY, "the data directory"), DEFINE_CONSTANT(B_FIND_PATH_DEVELOP_DIRECTORY, "the develop directory"), DEFINE_CONSTANT(B_FIND_PATH_DEVELOP_LIB_DIRECTORY,