Back to index

bamf  0.2.120
bamf-control.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2010 Canonical Ltd.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of either or both of the following licenses:
00006  *
00007  * 1) the GNU Lesser General Public License version 3, as published by the
00008  * Free Software Foundation; and/or
00009  * 2) the GNU Lesser General Public License version 2.1, as published by
00010  * the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranties of
00014  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00015  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00016  * License for more details.
00017  *
00018  * You should have received a copy of both the GNU Lesser General Public
00019  * License version 3 and version 2.1 along with this program.  If not, see
00020  * <http://www.gnu.org/licenses/>
00021  *
00022  * Authored by: Jason Smith <jason.smith@canonical.com>
00023  *              Neil Jagdish Patel <neil.patel@canonical.com>
00024  *
00025  */
00026 
00027 #ifndef _BAMF_CONTROL_H_
00028 #define _BAMF_CONTROL_H_
00029 
00030 #include <glib-object.h>
00031 
00032 G_BEGIN_DECLS
00033 
00034 #define BAMF_TYPE_CONTROL (bamf_control_get_type ())
00035 
00036 #define BAMF_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
00037         BAMF_TYPE_CONTROL, BamfControl))
00038 
00039 #define BAMF_CONTROL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
00040         BAMF_TYPE_CONTROL, BamfControlClass))
00041 
00042 #define BAMF_IS_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
00043         BAMF_TYPE_CONTROL))
00044 
00045 #define BAMF_IS_CONTROL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\
00046         BAMF_TYPE_CONTROL))
00047 
00048 #define BAMF_CONTROL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
00049         BAMF_TYPE_CONTROL, BamfControlClass))
00050 
00051 typedef struct _BamfControl        BamfControl;
00052 typedef struct _BamfControlClass   BamfControlClass;
00053 typedef struct _BamfControlPrivate BamfControlPrivate;
00054 
00055 enum
00056 {
00057   BAMF_CONTROL_APPROVE_NONE,
00058   BAMF_CONTROL_APPROVE_MATCHED,
00059   BAMF_CONTROL_APPROVE_ALL
00060 };
00061 
00062 struct _BamfControl
00063 {
00064   GObject parent;
00065 
00066   BamfControlPrivate *priv;
00067 };
00068 
00069 struct _BamfControlClass
00070 {
00071   GObjectClass parent_class;
00072 
00073   /*< private >*/
00074   void (*_control_padding1) (void);
00075   void (*_control_padding2) (void);
00076   void (*_control_padding3) (void);
00077   void (*_control_padding4) (void);
00078   void (*_control_padding5) (void);
00079   void (*_control_padding6) (void);
00080 };
00081 
00082 GType bamf_control_get_type (void) G_GNUC_CONST;
00083 
00084 BamfControl * bamf_control_get_default (void);
00085 
00086 void          bamf_control_insert_desktop_file          (BamfControl *control,
00087                                                          const gchar *desktop_file);
00088 
00089 void          bamf_control_register_application_for_pid (BamfControl *control,
00090                                                          const gchar *application,
00091                                                          gint32       pid);
00092 
00093 void          bamf_control_register_tab_provider        (BamfControl *control,
00094                                                          const char  *path);
00095                                                      
00096 void          bamf_control_set_approver_behavior        (BamfControl *control,
00097                                                          gint32       behavior);
00098 
00099 G_END_DECLS
00100 #endif