epoc32/include/stdapis/dbus-1.0/dbus/dbus-shared.h
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/dbus-1.0/dbus/dbus-shared.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,131 @@
     1.4 +/* -*- mode: C; c-file-style: "gnu" -*- */
     1.5 +/* dbus-shared.h  Stuff used by both dbus/dbus.h low-level and C/C++ binding APIs
     1.6 + *
     1.7 + * Copyright (C) 2004 Red Hat, Inc.
     1.8 + *
     1.9 + * Licensed under the Academic Free License version 2.1
    1.10 + * 
    1.11 + * This program is free software; you can redistribute it and/or modify
    1.12 + * it under the terms of the GNU General Public License as published by
    1.13 + * the Free Software Foundation; either version 2 of the License, or
    1.14 + * (at your option) any later version.
    1.15 + *
    1.16 + * This program is distributed in the hope that it will be useful,
    1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.19 + * GNU General Public License for more details.
    1.20 + * 
    1.21 + * You should have received a copy of the GNU General Public License
    1.22 + * along with this program; if not, write to the Free Software
    1.23 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.24 + *
    1.25 + */
    1.26 +
    1.27 +#ifndef DBUS_SHARED_H
    1.28 +#define DBUS_SHARED_H
    1.29 +
    1.30 +/* Don't include anything in here from anywhere else. It's
    1.31 + * intended for use by any random library.
    1.32 + */
    1.33 +
    1.34 +#ifdef  __cplusplus
    1.35 +extern "C" {
    1.36 +#if 0
    1.37 +} /* avoids confusing emacs indentation */
    1.38 +#endif
    1.39 +#endif
    1.40 +
    1.41 +/* Normally docs are in .c files, but there isn't a .c file for this. */
    1.42 +/**
    1.43 + * @defgroup DBusShared Shared constants 
    1.44 + * @ingroup  DBus
    1.45 + *
    1.46 + * @brief Shared header included by both libdbus and C/C++ bindings such as the GLib bindings.
    1.47 + *
    1.48 + * Usually a C/C++ binding such as the GLib or Qt binding won't want to include dbus.h in its
    1.49 + * public headers. However, a few constants and macros may be useful to include; those are
    1.50 + * found here and in dbus-protocol.h
    1.51 + *
    1.52 + * @{
    1.53 + */
    1.54 +
    1.55 +
    1.56 +/**
    1.57 + * Well-known bus types. See dbus_bus_get().
    1.58 + */
    1.59 +typedef enum
    1.60 +{
    1.61 +  DBUS_BUS_SESSION,    /**< The login session bus */
    1.62 +  DBUS_BUS_SYSTEM,     /**< The systemwide bus */
    1.63 +  DBUS_BUS_STARTER     /**< The bus that started us, if any */
    1.64 +} DBusBusType;
    1.65 +
    1.66 +/**
    1.67 + * Results that a message handler can return.
    1.68 + */
    1.69 +typedef enum
    1.70 +{
    1.71 +  DBUS_HANDLER_RESULT_HANDLED,         /**< Message has had its effect - no need to run more handlers. */ 
    1.72 +  DBUS_HANDLER_RESULT_NOT_YET_HANDLED, /**< Message has not had any effect - see if other handlers want it. */
    1.73 +  DBUS_HANDLER_RESULT_NEED_MEMORY      /**< Need more memory in order to return #DBUS_HANDLER_RESULT_HANDLED or #DBUS_HANDLER_RESULT_NOT_YET_HANDLED. Please try again later with more memory. */
    1.74 +} DBusHandlerResult;
    1.75 +
    1.76 +/* Bus names */
    1.77 +
    1.78 +/** The bus name used to talk to the bus itself. */
    1.79 +#define DBUS_SERVICE_DBUS      "org.freedesktop.DBus"
    1.80 +
    1.81 +/* Paths */
    1.82 +/** The object path used to talk to the bus itself. */
    1.83 +#define DBUS_PATH_DBUS  "/org/freedesktop/DBus"
    1.84 +/** The object path used in local/in-process-generated messages. */
    1.85 +#define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local"
    1.86 +
    1.87 +/* Interfaces, these #define don't do much other than
    1.88 + * catch typos at compile time
    1.89 + */
    1.90 +/** The interface exported by the object with #DBUS_SERVICE_DBUS and #DBUS_PATH_DBUS */
    1.91 +#define DBUS_INTERFACE_DBUS           "org.freedesktop.DBus"
    1.92 +/** The interface supported by introspectable objects */
    1.93 +#define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable"
    1.94 +/** The interface supported by objects with properties */
    1.95 +#define DBUS_INTERFACE_PROPERTIES     "org.freedesktop.DBus.Properties"
    1.96 +/** The interface supported by most dbus peers */
    1.97 +#define DBUS_INTERFACE_PEER           "org.freedesktop.DBus.Peer"
    1.98 +
    1.99 +/** This is a special interface whose methods can only be invoked
   1.100 + * by the local implementation (messages from remote apps aren't
   1.101 + * allowed to specify this interface).
   1.102 + */
   1.103 +#define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local"
   1.104 +
   1.105 +/* Owner flags */
   1.106 +#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1 /**< Allow another service to become the primary owner if requested */
   1.107 +#define DBUS_NAME_FLAG_REPLACE_EXISTING  0x2 /**< Request to replace the current primary owner */
   1.108 +#define DBUS_NAME_FLAG_DO_NOT_QUEUE      0x4 /**< If we can not become the primary owner do not place us in the queue */
   1.109 +
   1.110 +/* Replies to request for a name */
   1.111 +#define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER  1 /**< Service has become the primary owner of the requested name */
   1.112 +#define DBUS_REQUEST_NAME_REPLY_IN_QUEUE       2 /**< Service could not become the primary owner and has been placed in the queue */
   1.113 +#define DBUS_REQUEST_NAME_REPLY_EXISTS         3 /**< Service is already in the queue */
   1.114 +#define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER  4 /**< Service is already the primary owner */
   1.115 +
   1.116 +/* Replies to releasing a name */
   1.117 +#define DBUS_RELEASE_NAME_REPLY_RELEASED        1 /**< Service was released from the given name */
   1.118 +#define DBUS_RELEASE_NAME_REPLY_NON_EXISTENT    2 /**< The given name does not exist on the bus */
   1.119 +#define DBUS_RELEASE_NAME_REPLY_NOT_OWNER       3 /**< Service is not an owner of the given name */
   1.120 +
   1.121 +/* Replies to service starts */
   1.122 +#define DBUS_START_REPLY_SUCCESS         1 /**< Service was auto started */
   1.123 +#define DBUS_START_REPLY_ALREADY_RUNNING 2 /**< Service was already running */
   1.124 +
   1.125 +/** @} */
   1.126 +
   1.127 +#ifdef __cplusplus
   1.128 +#if 0
   1.129 +{ /* avoids confusing emacs indentation */
   1.130 +#endif
   1.131 +}
   1.132 +#endif
   1.133 +
   1.134 +#endif /* DBUS_SHARED_H */