File: gitg-io.h

package info (click to toggle)
gitg 0.2.7-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,528 kB
  • ctags: 2,943
  • sloc: ansic: 25,963; sh: 11,802; makefile: 371; xml: 364
file content (106 lines) | stat: -rw-r--r-- 3,797 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
 * gitg-io.h
 * This file is part of gitg
 *
 * Copyright (C) 2010 - Jesse van den Kieboom
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 */

#ifndef __GITG_IO_H__
#define __GITG_IO_H__

#include <glib-object.h>
#include <gio/gio.h>

G_BEGIN_DECLS

#define GITG_TYPE_IO		(gitg_io_get_type ())
#define GITG_IO(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_IO, GitgIO))
#define GITG_IO_CONST(obj)	(G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_IO, GitgIO const))
#define GITG_IO_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_IO, GitgIOClass))
#define GITG_IS_IO(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_IO))
#define GITG_IS_IO_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_IO))
#define GITG_IO_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_IO, GitgIOClass))

typedef struct _GitgIO		GitgIO;
typedef struct _GitgIOClass	GitgIOClass;
typedef struct _GitgIOPrivate	GitgIOPrivate;

struct _GitgIO
{
	/*< private >*/
	GObject parent;

	GitgIOPrivate *priv;

	/*< public >*/
};

struct _GitgIOClass
{
	/*< private >*/
	GObjectClass parent_class;

	/*< public >*/
	void (*cancel) (GitgIO *io);

	/* Signals */
	void (*begin) (GitgIO *io);
	void (*end) (GitgIO *io, GError *error);
};

GType          gitg_io_get_type             (void) G_GNUC_CONST;
GitgIO        *gitg_io_new                  (void);

void           gitg_io_begin                (GitgIO        *io);
void           gitg_io_end                  (GitgIO        *io,
                                             GError        *error);

void           gitg_io_set_input            (GitgIO        *io,
                                             GInputStream  *stream);
void           gitg_io_set_output           (GitgIO        *io,
                                             GOutputStream *stream);

GInputStream  *gitg_io_get_input            (GitgIO        *io);
GOutputStream *gitg_io_get_output           (GitgIO        *io);

void           gitg_io_close                (GitgIO        *io);
void           gitg_io_cancel               (GitgIO        *io);

gboolean       gitg_io_get_cancelled        (GitgIO        *io);
void           gitg_io_set_cancelled        (GitgIO        *io,
                                             gboolean       cancelled);

gint           gitg_io_get_exit_status      (GitgIO        *io);
void           gitg_io_set_exit_status      (GitgIO        *io,
                                             gint           status);

gboolean       gitg_io_get_running          (GitgIO        *io);
void           gitg_io_set_running          (GitgIO        *io,
                                             gboolean       running);

void           gitg_io_set_auto_utf8        (GitgIO        *io,
                                             gboolean       auto_utf8);
gboolean       gitg_io_get_auto_utf8        (GitgIO        *io);

gboolean       gitg_io_get_stderr_to_stdout (GitgIO        *io);
void           gitg_io_set_stderr_to_stdout (GitgIO        *io,
                                             gboolean       redirect);

G_END_DECLS

#endif /* __GITG_IO_H__ */