|
Packit |
130fc8 |
/* _dbus_bindings internal API. For use within _dbus_bindings only.
|
|
Packit |
130fc8 |
*
|
|
Packit |
130fc8 |
* Copyright (C) 2006 Collabora Ltd. <http://www.collabora.co.uk/>
|
|
Packit |
130fc8 |
*
|
|
Packit |
130fc8 |
* Permission is hereby granted, free of charge, to any person
|
|
Packit |
130fc8 |
* obtaining a copy of this software and associated documentation
|
|
Packit |
130fc8 |
* files (the "Software"), to deal in the Software without
|
|
Packit |
130fc8 |
* restriction, including without limitation the rights to use, copy,
|
|
Packit |
130fc8 |
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
Packit |
130fc8 |
* of the Software, and to permit persons to whom the Software is
|
|
Packit |
130fc8 |
* furnished to do so, subject to the following conditions:
|
|
Packit |
130fc8 |
*
|
|
Packit |
130fc8 |
* The above copyright notice and this permission notice shall be
|
|
Packit |
130fc8 |
* included in all copies or substantial portions of the Software.
|
|
Packit |
130fc8 |
*
|
|
Packit |
130fc8 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
Packit |
130fc8 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
Packit |
130fc8 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
Packit |
130fc8 |
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
Packit |
130fc8 |
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
Packit |
130fc8 |
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
Packit |
130fc8 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
Packit |
130fc8 |
* DEALINGS IN THE SOFTWARE.
|
|
Packit |
130fc8 |
*/
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
#ifndef DBUS_BINDINGS_CONN_H
|
|
Packit |
130fc8 |
#define DBUS_BINDINGS_CONN_H
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
#include "dbus_bindings-internal.h"
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
typedef struct {
|
|
Packit |
130fc8 |
PyObject_HEAD
|
|
Packit |
130fc8 |
DBusConnection *conn;
|
|
Packit |
130fc8 |
/* A list of filter callbacks. */
|
|
Packit |
130fc8 |
PyObject *filters;
|
|
Packit |
130fc8 |
/* A dict mapping object paths to one of:
|
|
Packit |
130fc8 |
* - tuples (unregister_callback or None, message_callback)
|
|
Packit |
130fc8 |
* - None (meaning unregistration from libdbus is in progress and nobody
|
|
Packit |
130fc8 |
* should touch this entry til we're finished)
|
|
Packit |
130fc8 |
*/
|
|
Packit |
130fc8 |
PyObject *object_paths;
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
/* Weak-references list to make Connections weakly referenceable */
|
|
Packit |
130fc8 |
PyObject *weaklist;
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
dbus_bool_t has_mainloop;
|
|
Packit |
130fc8 |
} Connection;
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
typedef struct {
|
|
Packit |
130fc8 |
PyObject_HEAD
|
|
Packit |
130fc8 |
DBusConnection *conn;
|
|
Packit |
130fc8 |
} DBusPyLibDBusConnection;
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
extern struct PyMethodDef DBusPyConnection_tp_methods[];
|
|
Packit |
130fc8 |
extern DBusHandlerResult DBusPyConnection_HandleMessage(Connection *,
|
|
Packit |
130fc8 |
PyObject *,
|
|
Packit |
130fc8 |
PyObject *);
|
|
Packit |
130fc8 |
extern PyObject *DBusPyConnection_ExistingFromDBusConnection(DBusConnection *);
|
|
Packit |
130fc8 |
extern PyObject *DBusPyConnection_GetObjectPathHandlers(PyObject *self,
|
|
Packit |
130fc8 |
PyObject *path);
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
extern PyObject *DBusPyConnection_NewForBus(PyTypeObject *cls, PyObject *args,
|
|
Packit |
130fc8 |
PyObject *kwargs);
|
|
Packit |
130fc8 |
extern PyObject *DBusPyConnection_SetUniqueName(Connection *, PyObject *);
|
|
Packit |
130fc8 |
extern PyObject *DBusPyConnection_GetUniqueName(Connection *, PyObject *);
|
|
Packit |
130fc8 |
|
|
Packit |
130fc8 |
#endif
|