1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  *  Copyright (C) 2008  Kouhei Sutou <kou@cozmixng.org>
4  *
5  *  This library is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU Lesser General Public License as published by
7  *  the Free Software Foundation, either version 3 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This library is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU Lesser General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Lesser General Public License
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef __CUT_PIPELINE_H__
21 #define __CUT_PIPELINE_H__
22 
23 #include <glib-object.h>
24 
25 #include <cutter/cut-stream-reader.h>
26 
27 G_BEGIN_DECLS
28 
29 #define CUT_PIPELINE_ERROR           (cut_pipeline_error_quark())
30 
31 #define CUT_TYPE_PIPELINE            (cut_pipeline_get_type ())
32 #define CUT_PIPELINE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), CUT_TYPE_PIPELINE, CutPipeline))
33 #define CUT_PIPELINE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), CUT_TYPE_PIPELINE, CutPipelineClass))
34 #define CUT_IS_PIPELINE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CUT_TYPE_PIPELINE))
35 #define CUT_IS_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUT_TYPE_PIPELINE))
36 #define CUT_PIPELINE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), CUT_TYPE_PIPELINE, CutPipelineClass))
37 
38 typedef struct _CutPipeline      CutPipeline;
39 typedef struct _CutPipelineClass CutPipelineClass;
40 
41 struct _CutPipeline
42 {
43     CutStreamReader object;
44 };
45 
46 struct _CutPipelineClass
47 {
48     CutStreamReaderClass parent_class;
49 };
50 
51 typedef enum
52 {
53     CUT_PIPELINE_ERROR_PIPE,
54     CUT_PIPELINE_ERROR_COMMAND_LINE,
55     CUT_PIPELINE_ERROR_SPAWN,
56     CUT_PIPELINE_ERROR_CHILD_PID,
57     CUT_PIPELINE_ERROR_IO_ERROR
58 } CutPipelineError;
59 
60 GQuark         cut_pipeline_error_quark(void);
61 GType          cut_pipeline_get_type  (void) G_GNUC_CONST;
62 
63 CutRunContext *cut_pipeline_new       (void);
64 CutRunContext *cut_pipeline_new_from_run_context
65                                       (CutRunContext *run_context);
66 
67 G_END_DECLS
68 
69 #endif /* __CUT_PIPELINE_H__ */
70 
71 /*
72 vi:ts=4:nowrap:ai:expandtab:sw=4
73 */
74