Back to index

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

Go to the source code of this file.

Classes

struct  _BamfControl
struct  _BamfControlClass

Defines

#define BAMF_TYPE_CONTROL   (bamf_control_get_type ())
#define BAMF_CONTROL(obj)
#define BAMF_CONTROL_CLASS(klass)
#define BAMF_IS_CONTROL(obj)
#define BAMF_IS_CONTROL_CLASS(klass)
#define BAMF_CONTROL_GET_CLASS(obj)

Typedefs

typedef struct _BamfControl
typedef struct _BamfControlClass
typedef struct _BamfControlPrivate

Enumerations

enum  { BAMF_CONTROL_APPROVE_NONE, BAMF_CONTROL_APPROVE_MATCHED, BAMF_CONTROL_APPROVE_ALL }

Functions

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

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)
Value:
(G_TYPE_CHECK_INSTANCE_CAST ((obj),\
        BAMF_TYPE_CONTROL, BamfControl))

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

#define BAMF_CONTROL_CLASS (   klass)
Value:
(G_TYPE_CHECK_CLASS_CAST ((klass),\
        BAMF_TYPE_CONTROL, BamfControlClass))

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

#define BAMF_CONTROL_GET_CLASS (   obj)
Value:
(G_TYPE_INSTANCE_GET_CLASS ((obj),\
        BAMF_TYPE_CONTROL, BamfControlClass))

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

#define BAMF_IS_CONTROL (   obj)
Value:
(G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
        BAMF_TYPE_CONTROL))

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

#define BAMF_IS_CONTROL_CLASS (   klass)
Value:
(G_TYPE_CHECK_CLASS_TYPE ((klass),\
        BAMF_TYPE_CONTROL))

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

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


Typedef Documentation

typedef struct _BamfControl

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

typedef struct _BamfControlClass

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

typedef struct _BamfControlPrivate

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


Enumeration Type Documentation

anonymous enum
Enumerator:
BAMF_CONTROL_APPROVE_NONE 
BAMF_CONTROL_APPROVE_MATCHED 
BAMF_CONTROL_APPROVE_ALL 

Definition at line 55 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));
}
GType bamf_control_get_type ( void  )
void bamf_control_insert_desktop_file ( BamfControl *  control,
const gchar *  desktop_file 
)

Definition at line 147 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,
                          "OmNomNomDesktopFile",
                          &error,
                          G_TYPE_STRING, desktop_file,
                          G_TYPE_INVALID,
                          G_TYPE_INVALID))
    {
      g_warning ("Failed to insert desktop file: %s", error->message);
      g_error_free (error);
    }
}

Here is the caller graph for this function:

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

Definition at line 169 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,
                          "RegisterApplicationForPid",
                          &error,
                          G_TYPE_STRING, application,
                          G_TYPE_UINT, pid,
                          G_TYPE_INVALID,
                          G_TYPE_INVALID))
    {
      g_warning ("Failed to register application: %s", error->message);
      g_error_free (error);
    }
}

Here is the caller graph for this function:

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

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

{
}

Here is the caller 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);
    }
}