2007-01-18 20:45:08 +03:00
|
|
|
/*
|
2009-10-25 18:14:49 +03:00
|
|
|
* Copyright 2001-2009, Haiku, Inc. All Rights Reserved.
|
2007-01-18 20:45:08 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Ingo Weinhold, bonefish@users.sf.net
|
|
|
|
*/
|
2002-07-22 02:37:39 +04:00
|
|
|
#ifndef REGISTRAR_DEFS_H
|
|
|
|
#define REGISTRAR_DEFS_H
|
|
|
|
|
2009-10-25 18:14:49 +03:00
|
|
|
|
2007-01-18 20:45:08 +03:00
|
|
|
//! API classes - registrar interface.
|
|
|
|
|
|
|
|
|
2002-07-22 02:37:39 +04:00
|
|
|
#include <Errors.h>
|
2002-07-26 23:57:58 +04:00
|
|
|
#include <Roster.h>
|
2002-07-22 02:37:39 +04:00
|
|
|
|
2007-01-18 20:45:08 +03:00
|
|
|
|
2005-01-18 04:06:30 +03:00
|
|
|
namespace BPrivate {
|
|
|
|
|
2002-07-22 02:37:39 +04:00
|
|
|
// names
|
2009-08-19 18:17:13 +04:00
|
|
|
extern const char* kRegistrarSignature;
|
|
|
|
extern const char* kRosterThreadName;
|
|
|
|
extern const char* kRAppLooperPortName;
|
2002-07-22 02:37:39 +04:00
|
|
|
|
2009-08-19 18:17:13 +04:00
|
|
|
extern const char* get_roster_port_name();
|
2005-01-18 04:06:30 +03:00
|
|
|
|
2009-08-19 18:17:13 +04:00
|
|
|
|
|
|
|
#define REGISTRAR_AUTHENTICATION_PORT_NAME "system:registrar:auth manager"
|
2008-04-17 20:19:18 +04:00
|
|
|
|
|
|
|
|
2002-07-22 02:37:39 +04:00
|
|
|
// message constants
|
|
|
|
enum {
|
2002-07-26 23:57:58 +04:00
|
|
|
// replies
|
2002-09-24 09:36:03 +04:00
|
|
|
B_REG_SUCCESS = 'rgsu',
|
|
|
|
B_REG_ERROR = 'rger',
|
|
|
|
B_REG_RESULT = 'rgrz',
|
2005-07-03 21:04:47 +04:00
|
|
|
|
2002-07-26 23:57:58 +04:00
|
|
|
// general requests
|
2002-09-24 09:36:03 +04:00
|
|
|
B_REG_GET_MIME_MESSENGER = 'rgmm',
|
|
|
|
B_REG_GET_CLIPBOARD_MESSENGER = 'rgcm',
|
2003-02-02 00:06:56 +03:00
|
|
|
B_REG_GET_DISK_DEVICE_MESSENGER = 'rgdm',
|
2005-07-03 21:04:47 +04:00
|
|
|
B_REG_SHUT_DOWN = 'rgsh',
|
|
|
|
|
2002-07-26 23:57:58 +04:00
|
|
|
// roster requests
|
2002-09-24 09:36:03 +04:00
|
|
|
B_REG_ADD_APP = 'rgaa',
|
|
|
|
B_REG_COMPLETE_REGISTRATION = 'rgcr',
|
2006-08-31 21:54:16 +04:00
|
|
|
B_REG_IS_APP_REGISTERED = 'rgip',
|
2002-09-24 09:36:03 +04:00
|
|
|
B_REG_REMOVE_PRE_REGISTERED_APP = 'rgrp',
|
|
|
|
B_REG_REMOVE_APP = 'rgra',
|
|
|
|
B_REG_SET_THREAD_AND_TEAM = 'rgtt',
|
2002-10-08 01:50:49 +04:00
|
|
|
B_REG_SET_SIGNATURE = 'rgss',
|
2002-09-24 09:36:03 +04:00
|
|
|
B_REG_GET_APP_INFO = 'rgai',
|
|
|
|
B_REG_GET_APP_LIST = 'rgal',
|
2007-01-18 20:45:08 +03:00
|
|
|
B_REG_UPDATE_ACTIVE_APP = 'rgua',
|
2002-10-16 02:30:10 +04:00
|
|
|
B_REG_BROADCAST = 'rgbc',
|
2002-10-18 18:03:54 +04:00
|
|
|
B_REG_START_WATCHING = 'rgwa',
|
|
|
|
B_REG_STOP_WATCHING = 'rgsw',
|
2002-10-27 10:47:18 +03:00
|
|
|
B_REG_GET_RECENT_DOCUMENTS = 'rggd',
|
|
|
|
B_REG_GET_RECENT_FOLDERS = 'rggf',
|
|
|
|
B_REG_GET_RECENT_APPS = 'rgga',
|
|
|
|
B_REG_ADD_TO_RECENT_DOCUMENTS = 'rg2d',
|
|
|
|
B_REG_ADD_TO_RECENT_FOLDERS = 'rg2f',
|
|
|
|
B_REG_ADD_TO_RECENT_APPS = 'rg2a',
|
|
|
|
B_REG_CLEAR_RECENT_DOCUMENTS = 'rgxd',
|
|
|
|
B_REG_CLEAR_RECENT_FOLDERS = 'rgxf',
|
|
|
|
B_REG_CLEAR_RECENT_APPS = 'rgxa',
|
2002-11-08 11:38:50 +03:00
|
|
|
B_REG_LOAD_RECENT_LISTS = 'rglr',
|
|
|
|
B_REG_SAVE_RECENT_LISTS = 'rgsr',
|
2005-07-03 21:04:47 +04:00
|
|
|
|
2002-08-17 01:59:24 +04:00
|
|
|
// MIME requests
|
2002-09-24 09:36:03 +04:00
|
|
|
B_REG_MIME_SET_PARAM = 'rgsp',
|
|
|
|
B_REG_MIME_DELETE_PARAM = 'rgdp',
|
|
|
|
B_REG_MIME_START_WATCHING = 'rgwb',
|
|
|
|
B_REG_MIME_STOP_WATCHING = 'rgwe',
|
|
|
|
B_REG_MIME_INSTALL = 'rgin',
|
|
|
|
B_REG_MIME_DELETE = 'rgdl',
|
|
|
|
B_REG_MIME_GET_INSTALLED_TYPES = 'rgit',
|
|
|
|
B_REG_MIME_GET_INSTALLED_SUPERTYPES = 'rgis',
|
|
|
|
B_REG_MIME_GET_SUPPORTING_APPS = 'rgsa',
|
|
|
|
B_REG_MIME_GET_ASSOCIATED_TYPES = 'rgat',
|
|
|
|
B_REG_MIME_SNIFF = 'rgsn',
|
2002-09-29 11:11:42 +04:00
|
|
|
B_REG_MIME_UPDATE_MIME_INFO = 'rgup',
|
|
|
|
B_REG_MIME_CREATE_APP_META_MIME = 'rgca',
|
|
|
|
B_REG_MIME_UPDATE_THREAD_FINISHED = 'rgtf',
|
2005-07-03 21:04:47 +04:00
|
|
|
|
2002-10-13 02:38:41 +04:00
|
|
|
// message runner requests
|
|
|
|
B_REG_REGISTER_MESSAGE_RUNNER = 'rgrr',
|
|
|
|
B_REG_UNREGISTER_MESSAGE_RUNNER = 'rgru',
|
|
|
|
B_REG_SET_MESSAGE_RUNNER_PARAMS = 'rgrx',
|
|
|
|
B_REG_GET_MESSAGE_RUNNER_INFO = 'rgri',
|
2005-07-03 21:04:47 +04:00
|
|
|
|
2002-10-15 01:05:39 +04:00
|
|
|
// internal registrar messages
|
|
|
|
B_REG_ROSTER_SANITY_EVENT = 'rgir',
|
2005-07-03 21:04:47 +04:00
|
|
|
B_REG_SHUTDOWN_FINISHED = 'rgsf',
|
2003-02-12 02:33:43 +03:00
|
|
|
B_REG_ROSTER_DEVICE_RESCAN = 'rgrs',
|
2005-07-03 21:04:47 +04:00
|
|
|
|
2002-10-22 04:08:45 +04:00
|
|
|
// clipboard handler requests
|
2003-02-02 00:06:56 +03:00
|
|
|
B_REG_ADD_CLIPBOARD = 'rgCa',
|
2002-11-09 23:55:41 +03:00
|
|
|
B_REG_GET_CLIPBOARD_COUNT = 'rgCc',
|
|
|
|
B_REG_CLIPBOARD_START_WATCHING = 'rgCw',
|
|
|
|
B_REG_CLIPBOARD_STOP_WATCHING = 'rgCx',
|
|
|
|
B_REG_DOWNLOAD_CLIPBOARD = 'rgCd',
|
2003-02-02 00:06:56 +03:00
|
|
|
B_REG_UPLOAD_CLIPBOARD = 'rgCu',
|
2005-07-03 21:04:47 +04:00
|
|
|
|
2003-02-02 00:06:56 +03:00
|
|
|
// disk device request
|
|
|
|
B_REG_NEXT_DISK_DEVICE = 'rgnx',
|
|
|
|
B_REG_GET_DISK_DEVICE = 'rgdd',
|
|
|
|
B_REG_UPDATE_DISK_DEVICE = 'rgud',
|
|
|
|
B_REG_DEVICE_START_WATCHING = 'rgwd',
|
|
|
|
B_REG_DEVICE_STOP_WATCHING = 'rgsd',
|
2007-11-14 04:28:47 +03:00
|
|
|
|
|
|
|
// debug_server notifications
|
|
|
|
B_REG_TEAM_DEBUGGER_ALERT = 'rtda',
|
2008-04-17 20:19:18 +04:00
|
|
|
|
|
|
|
// authentication requests
|
|
|
|
B_REG_GET_PASSWD_DB = 'rpdb',
|
|
|
|
B_REG_GET_GROUP_DB = 'rgdb',
|
|
|
|
B_REG_GET_SHADOW_PASSWD_DB = 'rsdb',
|
|
|
|
B_REG_GET_USER = 'rgus',
|
|
|
|
B_REG_GET_GROUP = 'rggr',
|
|
|
|
B_REG_GET_USER_GROUPS = 'rgug',
|
|
|
|
B_REG_UPDATE_USER = 'ruus',
|
2013-09-16 17:49:36 +04:00
|
|
|
B_REG_DELETE_USER = 'rdus',
|
2008-04-17 20:19:18 +04:00
|
|
|
B_REG_UPDATE_GROUP = 'rugr',
|
2013-09-16 17:49:36 +04:00
|
|
|
B_REG_DELETE_GROUP = 'rdgr',
|
2014-06-17 11:46:48 +04:00
|
|
|
|
|
|
|
// package watching requests
|
|
|
|
B_REG_PACKAGE_START_WATCHING = 'rgPw',
|
|
|
|
B_REG_PACKAGE_STOP_WATCHING = 'rgPx',
|
2002-08-17 01:59:24 +04:00
|
|
|
};
|
|
|
|
|
2009-08-19 18:17:13 +04:00
|
|
|
// B_REG_MIME_SET_PARAM "which" constants
|
2002-08-17 01:59:24 +04:00
|
|
|
enum {
|
|
|
|
B_REG_MIME_APP_HINT = 'rgmh',
|
|
|
|
B_REG_MIME_ATTR_INFO = 'rgma',
|
|
|
|
B_REG_MIME_DESCRIPTION = 'rgmd',
|
|
|
|
B_REG_MIME_FILE_EXTENSIONS = 'rgmf',
|
|
|
|
B_REG_MIME_ICON = 'rgmi',
|
|
|
|
B_REG_MIME_ICON_FOR_TYPE = 'rgm4',
|
|
|
|
B_REG_MIME_PREFERRED_APP = 'rgmp',
|
|
|
|
B_REG_MIME_SNIFFER_RULE = 'rgmr',
|
|
|
|
B_REG_MIME_SUPPORTED_TYPES = 'rgms',
|
2002-07-22 02:37:39 +04:00
|
|
|
};
|
|
|
|
|
2003-02-02 00:06:56 +03:00
|
|
|
// B_REG_UPDATE_DISK_DEVICE "update_policy" constants
|
|
|
|
enum {
|
|
|
|
B_REG_DEVICE_UPDATE_CHECK,
|
|
|
|
B_REG_DEVICE_UPDATE_CHANGED,
|
|
|
|
B_REG_DEVICE_UPDATE_DEVICE_CHANGED,
|
|
|
|
};
|
|
|
|
|
2002-07-22 02:37:39 +04:00
|
|
|
// type constants
|
|
|
|
enum {
|
|
|
|
B_REG_APP_INFO_TYPE = 'rgai', // app_info
|
|
|
|
};
|
|
|
|
|
|
|
|
// error constants
|
|
|
|
#define B_REGISTRAR_ERROR_BASE (B_ERRORS_END + 1)
|
|
|
|
|
|
|
|
enum {
|
2002-07-26 23:57:58 +04:00
|
|
|
B_REG_ALREADY_REGISTERED = B_REGISTRAR_ERROR_BASE,
|
|
|
|
// A team tries to register a second time.
|
|
|
|
B_REG_APP_NOT_REGISTERED,
|
|
|
|
B_REG_APP_NOT_PRE_REGISTERED,
|
|
|
|
};
|
|
|
|
|
|
|
|
// misc constants
|
|
|
|
enum {
|
2009-10-25 16:11:29 +03:00
|
|
|
B_REG_DEFAULT_APP_FLAGS = B_MULTIPLE_LAUNCH,
|
2002-07-26 23:57:58 +04:00
|
|
|
B_REG_APP_LOOPER_PORT_CAPACITY = 100,
|
|
|
|
};
|
|
|
|
|
|
|
|
// structs
|
|
|
|
|
|
|
|
// a flat app_info -- to be found in B_REG_APP_INFO_TYPE message fields
|
|
|
|
struct flat_app_info {
|
|
|
|
app_info info;
|
|
|
|
char ref_name[B_FILE_NAME_LENGTH + 1];
|
2002-07-22 02:37:39 +04:00
|
|
|
};
|
|
|
|
|
2005-01-18 04:06:30 +03:00
|
|
|
} // namespace BPrivate
|
|
|
|
|
2002-07-22 02:37:39 +04:00
|
|
|
#endif // REGISTRAR_DEFS_H
|
2002-10-22 04:08:45 +04:00
|
|
|
|