Back to index

bamf  0.2.120
Classes | Defines | Typedefs | Functions
bamf-control.h File Reference
#include "bamf.h"
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _BamfControlClass
struct  _BamfControl

Defines

#define BAMF_TYPE_CONTROL   (bamf_control_get_type ())
#define BAMF_CONTROL(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_CONTROL, BamfControl))
#define BAMF_IS_CONTROL(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAMF_TYPE_CONTROL))
#define BAMF_CONTROL_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), BAMF_TYPE_CONTROL, BamfControlClass))
#define BAMF_IS_CONTROL_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), BAMF_TYPE_CONTROL))
#define BAMF_CONTROL_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BAMF_TYPE_CONTROL, BamfControlClass))

Typedefs

typedef struct _BamfControl
typedef struct _BamfControlClass
typedef struct _BamfControlPrivate

Functions

GType bamf_control_get_type (void) G_GNUC_CONST
void bamf_control_register_application_for_pid (BamfControl *control, const char *application, gint32 pid)
void bamf_control_register_tab_provider (BamfControl *control, const char *sender, const char *path)
void bamf_control_insert_desktop_file (BamfControl *control, const char *path)
void bamf_control_set_approver_behavior (BamfControl *control, gint32 behavior)
void bamf_control_quit (BamfControl *control)
BamfControl * bamf_control_get_default (void)

Class Documentation

struct _BamfControl

Definition at line 62 of file bamf-control.h.

Class Members
BamfDBusControlSkeleton parent
GObject parent
BamfControlPrivate * priv

Define Documentation

#define BAMF_CONTROL (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_CONTROL, BamfControl))

Definition at line 31 of file bamf-control.h.

#define BAMF_CONTROL_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), BAMF_TYPE_CONTROL, BamfControlClass))

Definition at line 33 of file bamf-control.h.

#define BAMF_CONTROL_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), BAMF_TYPE_CONTROL, BamfControlClass))

Definition at line 35 of file bamf-control.h.

#define BAMF_IS_CONTROL (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAMF_TYPE_CONTROL))

Definition at line 32 of file bamf-control.h.

#define BAMF_IS_CONTROL_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), BAMF_TYPE_CONTROL))

Definition at line 34 of file bamf-control.h.

Definition at line 30 of file bamf-control.h.


Typedef Documentation

typedef struct _BamfControl

Definition at line 37 of file bamf-control.h.

typedef struct _BamfControlClass

Definition at line 38 of file bamf-control.h.

typedef struct _BamfControlPrivate

Definition at line 39 of file bamf-control.h.


Function Documentation

BamfControl* bamf_control_get_default ( void  )

Definition at line 116 of file bamf-control.c.

{
  if (BAMF_IS_CONTROL (default_control))
    return g_object_ref (default_control);

  return (default_control = g_object_new (BAMF_TYPE_CONTROL, NULL));
}

Here is the caller graph for this function:

GType bamf_control_get_type ( void  )
void bamf_control_insert_desktop_file ( BamfControl *  control,
const char *  path 
)

Definition at line 198 of file bamf-control.c.

{
  BamfMatcher *matcher = bamf_matcher_get_default ();
  bamf_matcher_load_desktop_file (matcher, path);
}

Here is the call graph for this function:

void bamf_control_quit ( BamfControl *  control)

Definition at line 234 of file bamf-control.c.

{
  g_idle_add ((GSourceFunc) bamf_control_on_quit, control);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void bamf_control_register_application_for_pid ( BamfControl *  control,
const char *  application,
gint32  pid 
)

Definition at line 189 of file bamf-control.c.

{
  BamfMatcher *matcher = bamf_matcher_get_default ();
  bamf_matcher_register_desktop_file_for_pid (matcher, application, pid);
}

Here is the call graph for this function:

void bamf_control_register_tab_provider ( BamfControl *  control,
const char *  sender,
const char *  path 
)

Definition at line 206 of file bamf-control.c.

{
  BamfTabSource *source;

  if (!path || !sender)
    {
      return;
    }

  source = bamf_tab_source_new (g_strdup (sender), g_strdup (path));

  if (BAMF_IS_TAB_SOURCE (source))
    {
      control->priv->sources = g_list_prepend (control->priv->sources, source);
    }
}

Here is the call graph for this function:

void bamf_control_set_approver_behavior ( BamfControl *  control,
gint32  behavior 
)

Definition at line 125 of file bamf-control.c.

{
  BamfControlPrivate *priv;
  GError *error = NULL;

  g_return_if_fail (BAMF_IS_CONTROL (control));
  priv = control->priv;

  if (!dbus_g_proxy_call (priv->proxy,
                          "SetApproverBehavior",
                          &error,
                          G_TYPE_INT, behavior,
                          G_TYPE_INVALID,
                          G_TYPE_INVALID))
    {
      g_warning ("Failed to register application: %s", error->message);
      g_error_free (error);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function: