Synopsis

struct              NtdMonitor;
struct              NtdMonitorClass;
void                ntd_monitor_add                     (NtdMonitor *monitor,
                                                         NtdSource *source);
NtdSource *         ntd_monitor_add_with_data           (NtdMonitor *monitor,
                                                         NtdProtocol *protocol,
                                                         NtdSourceType type,
                                                         const gchar *address);
guint               ntd_monitor_get_slice               (NtdMonitor *monitor);
gboolean            ntd_monitor_is_running              (NtdMonitor *monitor);
NtdMonitor *        ntd_monitor_new                     (void);
void                ntd_monitor_remove                  (NtdMonitor *monitor,
                                                         NtdSource *source);
void                ntd_monitor_set_slice               (NtdMonitor *monitor,
                                                         guint slice);
gboolean            ntd_monitor_start                   (NtdMonitor *monitor);
void                ntd_monitor_stop                    (NtdMonitor *monitor);

Object Hierarchy

  GObject
   +----NtdMonitor

Properties

  "slice"                    guint                 : Read / Write

Signals

  "refresh"                                        : Run Last

Description

Details

struct NtdMonitor

struct NtdMonitor;

struct NtdMonitorClass

struct NtdMonitorClass {
    GObjectClass   parent_class;

    /* Virtual Table */

    /* Signals */
    void          (* refresh)                     (NtdMonitor*     monitor);
};

ntd_monitor_add ()

void                ntd_monitor_add                     (NtdMonitor *monitor,
                                                         NtdSource *source);

ntd_monitor_add_with_data ()

NtdSource *         ntd_monitor_add_with_data           (NtdMonitor *monitor,
                                                         NtdProtocol *protocol,
                                                         NtdSourceType type,
                                                         const gchar *address);

ntd_monitor_get_slice ()

guint               ntd_monitor_get_slice               (NtdMonitor *monitor);

Gets the slice time (in milliseconds) to set between two consecutive refresh operations. If the slice time is set to 0, it means the monitor must refresh the source objects continuosly, at the maximum available speed.

Remember the precision of the slice is system dependent, so do not expect the time is really managed in milliseconds.

monitor :

an NtdMonitor object.

Returns :

the requested slice time, or G_MAXUINT on errors.

ntd_monitor_is_running ()

gboolean            ntd_monitor_is_running              (NtdMonitor *monitor);

ntd_monitor_new ()

NtdMonitor *        ntd_monitor_new                     (void);

Creates a new NtdMonitor object.

Returns :

the newly created object.

ntd_monitor_remove ()

void                ntd_monitor_remove                  (NtdMonitor *monitor,
                                                         NtdSource *source);

ntd_monitor_set_slice ()

void                ntd_monitor_set_slice               (NtdMonitor *monitor,
                                                         guint slice);

Sets the new slice time on monitor. See ntd_monitor_get_slice() for a description of what it is the slice time.

monitor :

an NtdMonitor object.

slice :

the new slice time (in milliseconds).

ntd_monitor_start ()

gboolean            ntd_monitor_start                   (NtdMonitor *monitor);

ntd_monitor_stop ()

void                ntd_monitor_stop                    (NtdMonitor *monitor);

Property Details

The "slice" property

  "slice"                    guint                 : Read / Write

Time gap between two refreshes: set to 0 to read continuosly at the maximum speed.

Allowed values: <= 4294967294

Default value: 0

Signal Details

The "refresh" signal

void                user_function                      (NtdMonitor *monitor,
                                                        gpointer    user_data)      : Run Last

Emitted whenever a NtdMonitor refreshes the values of its own sources.

monitor :

an NtdMonitor object.

user_data :

user data set when the signal handler was connected.