index.html
Main Page
|
modules.html
Modules
|
namespaces.html
Namespace List
|
hierarchy.html
Class Hierarchy
|
annotated.html
Data Structures
|
dirs.html
Directories
|
files.html
File List
|
namespacemembers.html
Namespace Members
|
functions.html
Data Fields
|
pages.html
Related Pages
DBusWatch
[
group__DBus.html
D-BUS low-level public API
]
Object representing a file descriptor to be watched.
#_details
More...
Typedefs
typedef
structDBusWatch.html
DBusWatch
group__DBusWatch.html#ga6
DBusWatch
Opaque object representing a file descriptor to be watched for changes in readability, writability, or hangup.
Functions
int
group__DBusWatch.html#ga0
dbus_watch_get_fd
(
structDBusWatch.html
DBusWatch
*watch)
Gets the file descriptor that should be watched.
#ga0
unsigned int
group__DBusWatch.html#ga1
dbus_watch_get_flags
(
structDBusWatch.html
DBusWatch
*watch)
Gets flags from DBusWatchFlags indicating what conditions should be monitored on the file descriptor.
#ga1
void *
group__DBusWatch.html#ga2
dbus_watch_get_data
(
structDBusWatch.html
DBusWatch
*watch)
Gets data previously set with
group__DBusWatch.html#ga3
dbus_watch_set_data()
or
group__DBusMacros.html#ga4
NULL
if none.
#ga2
void
group__DBusWatch.html#ga3
dbus_watch_set_data
(
structDBusWatch.html
DBusWatch
*watch, void *data,
group__DBusMemory.html#ga8
DBusFreeFunction
free_data_function)
Sets data which can be retrieved with
group__DBusWatch.html#ga2
dbus_watch_get_data()
.
#ga3
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusWatch.html#ga4
dbus_watch_get_enabled
(
structDBusWatch.html
DBusWatch
*watch)
Returns whether a watch is enabled or not.
#ga4
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusWatch.html#ga5
dbus_watch_handle
(
structDBusWatch.html
DBusWatch
*watch, unsigned int flags)
Called to notify the D-BUS library when a previously-added watch is ready for reading or writing, or has an exception such as a hangup.
#ga5
Detailed Description
Object representing a file descriptor to be watched.
Types and functions related to
structDBusWatch.html
DBusWatch
. A watch represents a file descriptor that the main loop needs to monitor, as in Qt's QSocketNotifier or GLib's g_io_add_watch().
Function Documentation
void* dbus_watch_get_data
(
structDBusWatch.html
DBusWatch
*
watch
)
Gets data previously set with
group__DBusWatch.html#ga3
dbus_watch_set_data()
or
group__DBusMacros.html#ga4
NULL
if none.
Parameters:
watch
the
structDBusWatch.html
DBusWatch
object.
Returns:
previously-set data.
Definition at line
dbus-watch_8c-source.html#l00521
521
of file
dbus-watch_8c-source.html
dbus-watch.c
.
References
dbus-watch_8c-source.html#l00049
data
.
group__DBusTypes.html#ga2
dbus_bool_t
dbus_watch_get_enabled
(
structDBusWatch.html
DBusWatch
*
watch
)
Returns whether a watch is enabled or not.
If not enabled, it should not be polled by the main loop.
Parameters:
watch
the
structDBusWatch.html
DBusWatch
object
Returns:
group__DBusMacros.html#ga2
TRUE
if the watch is enabled
Definition at line
dbus-watch_8c-source.html#l00561
561
of file
dbus-watch_8c-source.html
dbus-watch.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-watch_8c-source.html#l00051
enabled
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
integrator_8cpp-source.html#l00184
DBusQt::Internal::Integrator::addWatch()
, and
integrator_8cpp-source.html#l00056
DBusQt::Internal::dbusToggleWatch()
.
int dbus_watch_get_fd
(
structDBusWatch.html
DBusWatch
*
watch
)
Gets the file descriptor that should be watched.
Parameters:
watch
the
structDBusWatch.html
DBusWatch
object.
Returns:
the file descriptor to watch.
Definition at line
dbus-watch_8c-source.html#l00487
487
of file
dbus-watch_8c-source.html
dbus-watch.c
.
References
dbus-watch_8c-source.html#l00042
fd
.
Referenced by
dbus-transport_8c-source.html#l00603
_dbus_transport_handle_watch()
,
dbus-watch_8c-source.html#l00351
_dbus_watch_list_add_watch()
,
dbus-watch_8c-source.html#l00384
_dbus_watch_list_remove_watch()
,
dbus-watch_8c-source.html#l00253
_dbus_watch_list_set_functions()
,
dbus-watch_8c-source.html#l00411
_dbus_watch_list_toggle_watch()
,
integrator_8cpp-source.html#l00184
DBusQt::Internal::Integrator::addWatch()
,
dbus-watch_8c-source.html#l00538
dbus_watch_set_data()
, and
integrator_8cpp-source.html#l00208
DBusQt::Internal::Integrator::removeWatch()
.
unsigned int dbus_watch_get_flags
(
structDBusWatch.html
DBusWatch
*
watch
)
Gets flags from DBusWatchFlags indicating what conditions should be monitored on the file descriptor.
The flags returned will only contain DBUS_WATCH_READABLE and DBUS_WATCH_WRITABLE, never DBUS_WATCH_HANGUP or DBUS_WATCH_ERROR; all watches implicitly include a watch for hangups, errors, and other exceptional conditions.
Parameters:
watch
the
structDBusWatch.html
DBusWatch
object.
Returns:
the conditions to watch.
Definition at line
dbus-watch_8c-source.html#l00506
506
of file
dbus-watch_8c-source.html
dbus-watch.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
, and
dbus-watch_8c-source.html#l00043
flags
.
Referenced by
dbus-watch_8c-source.html#l00253
_dbus_watch_list_set_functions()
, and
integrator_8cpp-source.html#l00184
DBusQt::Internal::Integrator::addWatch()
.
group__DBusTypes.html#ga2
dbus_bool_t
dbus_watch_handle
(
structDBusWatch.html
DBusWatch
*
watch
,
unsigned int
flags
)
Called to notify the D-BUS library when a previously-added watch is ready for reading or writing, or has an exception such as a hangup.
If this function returns
group__DBusMacros.html#ga3
FALSE
, then the file descriptor may still be ready for reading or writing, but more memory is needed in order to do the reading or writing. If you ignore the
group__DBusMacros.html#ga3
FALSE
return, your application may spin in a busy loop on the file descriptor until memory becomes available, but nothing more catastrophic should happen.
group__DBusWatch.html#ga5
dbus_watch_handle()
cannot be called during the DBusAddWatchFunction, as the connection will not be ready to handle that watch yet.
It is not allowed to reference a
structDBusWatch.html
DBusWatch
after it has been passed to remove_function.
Parameters:
watch
the
structDBusWatch.html
DBusWatch
object.
flags
the poll condition using DBusWatchFlags values
Returns:
group__DBusMacros.html#ga3
FALSE
if there wasn't enough memory
Definition at line
dbus-watch_8c-source.html#l00591
591
of file
dbus-watch_8c-source.html
dbus-watch.c
.
References
dbus-internals_8c-source.html#l00203
_dbus_warn()
,
dbus-watch_8c-source.html#l00161
_dbus_watch_sanitize_condition()
,
dbus-watch_8c-source.html#l00042
fd
,
dbus-watch_8c-source.html#l00043
flags
,
dbus-watch_8c-source.html#l00045
handler
,
dbus-watch_8c-source.html#l00046
handler_data
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
integrator_8cpp-source.html#l00163
DBusQt::Internal::Integrator::slotRead()
, and
integrator_8cpp-source.html#l00172
DBusQt::Internal::Integrator::slotWrite()
.
void dbus_watch_set_data
(
structDBusWatch.html
DBusWatch
*
watch
,
void *
data
,
group__DBusMemory.html#ga8
DBusFreeFunction
free_data_function
)
Sets data which can be retrieved with
group__DBusWatch.html#ga2
dbus_watch_get_data()
.
Intended for use by the DBusAddWatchFunction and DBusRemoveWatchFunction to store their own data. For example with Qt you might store the QSocketNotifier for this watch and with GLib you might store a GSource.
Parameters:
watch
the
structDBusWatch.html
DBusWatch
object.
data
the data.
free_data_function
function to be called to free the data.
Definition at line
dbus-watch_8c-source.html#l00538
538
of file
dbus-watch_8c-source.html
dbus-watch.c
.
References
dbus-watch_8c-source.html#l00487
dbus_watch_get_fd()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-watch_8c-source.html#l00117
_dbus_watch_unref()
.
Generated on Tue Sep 13 01:28:09 2005 for D-BUS by
http://www.doxygen.org/index.html
doxygen
1.4.4
