BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bsejanitor.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BSE_JANITOR_H__
00003 #define __BSE_JANITOR_H__
00004 
00005 #include <bse/bseitem.hh>
00006 
00007 G_BEGIN_DECLS
00008 
00009 /* --- object type macros --- */
00010 #define BSE_TYPE_JANITOR              (BSE_TYPE_ID (BseJanitor))
00011 #define BSE_JANITOR(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_JANITOR, BseJanitor))
00012 #define BSE_JANITOR_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_JANITOR, BseJanitorClass))
00013 #define BSE_IS_JANITOR(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_JANITOR))
00014 #define BSE_IS_JANITOR_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_JANITOR))
00015 #define BSE_JANITOR_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_JANITOR, BseJanitorClass))
00016 
00017 
00018 /* --- object structures --- */
00019 struct BseJanitor : BseItem {
00020   guint           port_closed : 1;
00021   guint           force_kill : 1;
00022   guint           force_normal_exit : 1;
00023   SfiComPort     *port;
00024   SfiGlueContext *context;
00025   SfiGlueDecoder *decoder;
00026   GSource        *source;
00027   gchar          *status_message;
00028   gchar          *script_name;
00029   gchar          *proc_name;
00030   GSList         *actions;
00031   /* closed connections (port==NULL) */
00032   gint           exit_code;
00033   gchar         *exit_reason;
00034 };
00035 struct BseJanitorClass : BseItemClass
00036 {};
00037 struct BseJanitorAction {
00038   GQuark action;
00039   gchar *name;
00040   gchar *blurb;
00041 };
00042 
00043 /* --- prototypes --- */
00044 BseJanitor*  bse_janitor_new            (SfiComPort     *port);
00045 void         bse_janitor_kill           (BseJanitor     *self);
00046 void         bse_janitor_close          (BseJanitor     *self);
00047 const gchar* bse_janitor_get_ident      (BseJanitor     *self);
00048 void         bse_janitor_set_procedure  (BseJanitor     *self,
00049                                          const gchar    *script,
00050                                          const gchar    *proc);
00051 BseJanitor*  bse_janitor_get_current    (void);
00052 void         bse_janitor_progress       (BseJanitor     *self,
00053                                          gfloat          progress);
00054 void         bse_janitor_add_action     (BseJanitor     *self,
00055                                          const gchar    *action,
00056                                          const gchar    *name,
00057                                          const gchar    *blurb);
00058 void         bse_janitor_remove_action  (BseJanitor     *self,
00059                                          const gchar    *action);
00060 void         bse_janitor_trigger_action (BseJanitor     *self,
00061                                          const gchar    *action);
00062 
00063 G_END_DECLS
00064 
00065 #endif /* __BSE_JANITOR_H__ */
00066 
00067 /* vim:set ts=8 sts=2 sw=2: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines