# DBus-C++

## Desktop Communication Bus System

libdbus-c-- Documentation 0.9.0

- Files
- Data Structures
- Globals
- Main Page

Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
DBus::Glib::BusWatch Class Reference

`#include <glib-integration.h>`

Inheritance diagram for DBus::Glib::BusWatch:

## Private Member Functions

| BusWatch (Watch::Internal *, GMainContext *, int)
| ~BusWatch ()
void | toggle ()
void | _enable ()
void | _disable ()

## Static Private Member Functions

static gboolean | watch_handler (gpointer)

## Private Attributes

GMainContext * | _ctx
int | _priority
GSource * | _source

## Friends

class | BusDispatcher

## Additional Inherited Members

Public Member Functions inherited from DBus::Watch
| Watch (Internal *i)
virtual | ~Watch ()
int | descriptor () const
| A main loop could poll this descriptor to integrate dbus-c++.
int | flags () const
| Gets flags from DBusWatchFlags indicating what conditions should be monitored on the file descriptor.
bool | enabled () const
bool | handle (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.

## Detailed Description

Definition at line 66 of file glib-integration.h.

## Constructor & Destructor Documentation

## ◆ BusWatch()

Glib::BusWatch::BusWatch | ( | Watch::Internal * | wi,
|  | GMainContext * | ctx,
|  | int | priority )

private

Definition at line 120 of file glib-integration.cpp.

References _ctx, _enable(), _priority, _source, DBus::Watch::enabled(), and DBus::Watch::Watch().

## ◆ ~BusWatch()

Glib::BusWatch::~BusWatch | ( |  | ) |

private

Definition at line 127 of file glib-integration.cpp.

References _disable().

## Member Function Documentation

## ◆ _disable()

void Glib::BusWatch::_disable | ( |  | ) |

private

Definition at line 190 of file glib-integration.cpp.

References _source.

Referenced by _enable(), toggle(), and ~BusWatch().

## ◆ _enable()

void Glib::BusWatch::_enable | ( |  | ) |

private

Definition at line 161 of file glib-integration.cpp.

References _ctx, _disable(), _priority, _source, DBus::Watch::descriptor(), DBus::Watch::flags(), watch_funcs, and watch_handler().

Referenced by BusWatch(), and toggle().

## ◆ toggle()

void Glib::BusWatch::toggle | ( |  | ) |

private virtual

Implements DBus::Watch.

Definition at line 132 of file glib-integration.cpp.

References _disable(), _enable(), DBus::debug_log, and DBus::Watch::enabled().

## ◆ watch_handler()

gboolean Glib::BusWatch::watch_handler | ( | gpointer | data | ) |

static private

Definition at line 140 of file glib-integration.cpp.

References _source, DBus::Watch::flags(), DBus::Watch::handle(), and BusSource::poll.

Referenced by _enable().

## Friends And Related Symbol Documentation

## ◆ BusDispatcher

friend class BusDispatcher

friend

Definition at line 88 of file glib-integration.h.

References BusDispatcher.

Referenced by BusDispatcher.

## Member Data Documentation

## ◆ _ctx

GMainContext* DBus::Glib::BusWatch::_ctx

private

Definition at line 84 of file glib-integration.h.

Referenced by _enable(), and BusWatch().

## ◆ _priority

int DBus::Glib::BusWatch::_priority

private

Definition at line 85 of file glib-integration.h.

Referenced by _enable(), and BusWatch().

## ◆ _source

GSource* DBus::Glib::BusWatch::_source

private

Definition at line 86 of file glib-integration.h.

Referenced by _disable(), _enable(), BusWatch(), and watch_handler().

The documentation for this class was generated from the following files:

- glib-integration.h
- glib-integration.cpp