pcb 4.1.1
An interactive printed circuit board layout editor.

dbus-pcbmain.c File Reference

PCB HID main loop integration. More...

#include <dbus/dbus.h>
#include <stdio.h>
#include "global.h"
#include "dbus-pcbmain.h"
Include dependency graph for dbus-pcbmain.c:

Go to the source code of this file.

Data Structures

struct  _IOWatchHandler
struct  _TimeoutHandler

Defines

#define DBUS_API_SUBJECT_TO_CHANGE

Typedefs

typedef struct _IOWatchHandler IOWatchHandler
typedef struct _TimeoutHandler TimeoutHandler

Functions

static void block_hook_cb (hidval data)
static void io_watch_handler_dbus_freed (void *data)
void io_watch_handler_cb (hidval pcb_watch, int fd, unsigned int condition, hidval data)
static void timeout_handler_dbus_freed (void *data)
void timeout_handler_cb (hidval data)
static dbus_bool_t watch_add (DBusWatch *dbus_watch, void *data)
static void watch_remove (DBusWatch *dbus_watch, void *data)
static void watch_toggled (DBusWatch *dbus_watch, void *data)
static dbus_bool_t timeout_add (DBusTimeout *timeout, void *data)
static void timeout_remove (DBusTimeout *timeout, void *data)
static void timeout_toggled (DBusTimeout *timeout, void *data)
void dispatch_status_changed (DBusConnection *conn, DBusDispatchStatus new_status, void *data)
void pcb_dbus_connection_setup_with_mainloop (DBusConnection *connection)
void pcb_dbus_connection_finish_with_mainloop (DBusConnection *connection)

Detailed Description

PCB HID main loop integration.

Adapted from dbus-gmain.c from dbus-glib bindings:

Copyright (C) 2002, 2003 CodeFactory AB

Copyright (C) 2005 Red Hat, Inc.

Licensed under the Academic Free License version 2.1

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file dbus-pcbmain.c.


Define Documentation

#define DBUS_API_SUBJECT_TO_CHANGE

Definition at line 36 of file dbus-pcbmain.c.


Typedef Documentation

Definition at line 43 of file dbus-pcbmain.c.

Definition at line 44 of file dbus-pcbmain.c.


Function Documentation

static void block_hook_cb ( hidval  data) [static]

Definition at line 61 of file dbus-pcbmain.c.

References connection(), and hidval::ptr.

Referenced by pcb_dbus_connection_setup_with_mainloop().

Here is the call graph for this function:

void dispatch_status_changed ( DBusConnection *  conn,
DBusDispatchStatus  new_status,
void *  data 
)

Definition at line 251 of file dbus-pcbmain.c.

Referenced by pcb_dbus_connection_setup_with_mainloop().

void io_watch_handler_cb ( hidval  pcb_watch,
int  fd,
unsigned int  condition,
hidval  data 
)
static void io_watch_handler_dbus_freed ( void *  data) [static]

Definition at line 79 of file dbus-pcbmain.c.

References gui, _IOWatchHandler::pcb_watch, and hid_st::unwatch_file.

Referenced by watch_add().

void pcb_dbus_connection_finish_with_mainloop ( DBusConnection *  connection)

Definition at line 321 of file dbus-pcbmain.c.

Referenced by pcb_dbus_finish().

void pcb_dbus_connection_setup_with_mainloop ( DBusConnection *  connection)

Sets the watch and timeout functions of a #DBusConnection to integrate the connection with the GUI HID's main loop.

Parameters:
connectionthe connection

Definition at line 271 of file dbus-pcbmain.c.

References hid_st::add_block_hook, block_hook_cb(), dispatch_status_changed(), gui, hidval::ptr, timeout_add(), timeout_remove(), timeout_toggled(), watch_add(), watch_remove(), and watch_toggled().

Referenced by pcb_dbus_setup().

Here is the call graph for this function:

static dbus_bool_t timeout_add ( DBusTimeout *  timeout,
void *  data 
) [static]
void timeout_handler_cb ( hidval  data)
static void timeout_handler_dbus_freed ( void *  data) [static]

Definition at line 126 of file dbus-pcbmain.c.

References gui, _TimeoutHandler::pcb_timer, and hid_st::stop_timer.

Referenced by timeout_add().

static void timeout_remove ( DBusTimeout *  timeout,
void *  data 
) [static]

Definition at line 234 of file dbus-pcbmain.c.

Referenced by pcb_dbus_connection_setup_with_mainloop(), and timeout_toggled().

static void timeout_toggled ( DBusTimeout *  timeout,
void *  data 
) [static]

Definition at line 241 of file dbus-pcbmain.c.

References timeout_add(), and timeout_remove().

Referenced by pcb_dbus_connection_setup_with_mainloop().

Here is the call graph for this function:

static dbus_bool_t watch_add ( DBusWatch *  dbus_watch,
void *  data 
) [static]
static void watch_remove ( DBusWatch *  dbus_watch,
void *  data 
) [static]

Definition at line 191 of file dbus-pcbmain.c.

Referenced by pcb_dbus_connection_setup_with_mainloop(), and watch_toggled().

static void watch_toggled ( DBusWatch *  dbus_watch,
void *  data 
) [static]

Definition at line 198 of file dbus-pcbmain.c.

References watch_add(), and watch_remove().

Referenced by pcb_dbus_connection_setup_with_mainloop().

Here is the call graph for this function: