BEAST/BSE - Better Audio System and Sound Engine  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bsejanitor.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BSE_JANITOR_H__
3 #define __BSE_JANITOR_H__
4 
5 #include <bse/bseitem.hh>
6 
7 G_BEGIN_DECLS
8 
9 /* --- object type macros --- */
10 #define BSE_TYPE_JANITOR (BSE_TYPE_ID (BseJanitor))
11 #define BSE_JANITOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_JANITOR, BseJanitor))
12 #define BSE_JANITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_JANITOR, BseJanitorClass))
13 #define BSE_IS_JANITOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_JANITOR))
14 #define BSE_IS_JANITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_JANITOR))
15 #define BSE_JANITOR_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_JANITOR, BseJanitorClass))
16 
17 
18 /* --- object structures --- */
19 struct BseJanitor : BseItem {
20  guint port_closed : 1;
21  guint force_kill : 1;
22  guint force_normal_exit : 1;
23  SfiComPort *port;
24  SfiGlueContext *context;
25  SfiGlueDecoder *decoder;
26  GSource *source;
27  gchar *status_message;
28  gchar *script_name;
29  gchar *proc_name;
30  GSList *actions;
31  /* closed connections (port==NULL) */
32  gint exit_code;
33  gchar *exit_reason;
34 };
36 {};
38  GQuark action;
39  gchar *name;
40  gchar *blurb;
41 };
42 
43 /* --- prototypes --- */
44 BseJanitor* bse_janitor_new (SfiComPort *port);
45 void bse_janitor_kill (BseJanitor *self);
46 void bse_janitor_close (BseJanitor *self);
47 const gchar* bse_janitor_get_ident (BseJanitor *self);
48 void bse_janitor_set_procedure (BseJanitor *self,
49  const gchar *script,
50  const gchar *proc);
51 BseJanitor* bse_janitor_get_current (void);
52 void bse_janitor_progress (BseJanitor *self,
53  gfloat progress);
54 void bse_janitor_add_action (BseJanitor *self,
55  const gchar *action,
56  const gchar *name,
57  const gchar *blurb);
58 void bse_janitor_remove_action (BseJanitor *self,
59  const gchar *action);
60 void bse_janitor_trigger_action (BseJanitor *self,
61  const gchar *action);
62 
63 G_END_DECLS
64 
65 #endif /* __BSE_JANITOR_H__ */
66 
67 /* vim:set ts=8 sts=2 sw=2: */
Definition: sficomport.hh:16
Definition: bsejanitor.hh:19
Definition: bsejanitor.hh:35
Definition: bseitem.hh:39
Definition: bsejanitor.hh:37
Definition: bseitem.hh:33