Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
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 /* --- object type macros --- */
8 #define BSE_TYPE_JANITOR (BSE_TYPE_ID (BseJanitor))
9 #define BSE_JANITOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_JANITOR, BseJanitor))
10 #define BSE_JANITOR_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_JANITOR, BseJanitorClass))
11 #define BSE_IS_JANITOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_JANITOR))
12 #define BSE_IS_JANITOR_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_JANITOR))
13 #define BSE_JANITOR_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_JANITOR, BseJanitorClass))
14 
15 
16 /* --- object structures --- */
17 struct BseJanitor : BseItem {
18  guint port_closed : 1;
19  guint force_kill : 1;
20  guint force_normal_exit : 1;
21  SfiComPort *port;
22  SfiGlueContext *context;
23  SfiGlueDecoder *decoder;
24  GSource *source;
25  gchar *status_message;
26  gchar *script_name;
27  gchar *proc_name;
28  GSList *actions;
29  /* closed connections (port==NULL) */
30  gint exit_code;
31  gchar *exit_reason;
32 };
34 {};
36  GQuark action;
37  gchar *name;
38  gchar *blurb;
39 };
40 
41 /* --- prototypes --- */
42 BseJanitor* bse_janitor_new (SfiComPort *port);
43 void bse_janitor_kill (BseJanitor *self);
44 void bse_janitor_close (BseJanitor *self);
45 const gchar* bse_janitor_get_ident (BseJanitor *self);
46 void bse_janitor_set_procedure (BseJanitor *self,
47  const gchar *script,
48  const gchar *proc);
49 BseJanitor* bse_janitor_get_current (void);
51  gfloat progress);
52 void bse_janitor_add_action (BseJanitor *self,
53  const gchar *action,
54  const gchar *name,
55  const gchar *blurb);
56 void bse_janitor_remove_action (BseJanitor *self,
57  const gchar *action);
58 void bse_janitor_trigger_action (BseJanitor *self,
59  const gchar *action);
60 
61 #endif /* __BSE_JANITOR_H__ */
62 
63 /* vim:set ts=8 sts=2 sw=2: */
Definition: sficomport.hh:14
Definition: bsejanitor.hh:17
Definition: bsejanitor.hh:33
void bse_janitor_progress(BseJanitor *self, float progress)
Definition: bsejanitor.cc:262
Definition: bseitem.hh:37
Definition: bsejanitor.hh:35
Definition: bseitem.hh:32