~ubuntu-branches/ubuntu/trusty/gcr/trusty-proposed

« back to all changes in this revision

Viewing changes to gcr/gcr-callback-output-stream.h

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-03 10:18:39 UTC
  • Revision ID: package-import@ubuntu.com-20120503101839-wuvloldm7gmdsnij
Tags: upstream-3.4.1
ImportĀ upstreamĀ versionĀ 3.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * gnome-keyring
 
3
 *
 
4
 * Copyright (C) 2011 Collabora Ltd.
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU Lesser General Public License as
 
8
 * published by the Free Software Foundation; either version 2.1 of
 
9
 * the License, or (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful, but
 
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
 * Lesser General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public
 
17
 * License along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
19
 * 02111-1307, USA.
 
20
 *
 
21
 * Author: Stef Walter <stefw@collabora.co.uk>
 
22
 */
 
23
 
 
24
#ifndef GCR_CALLBACK_OUTPUT_STREAM_H
 
25
#define GCR_CALLBACK_OUTPUT_STREAM_H
 
26
 
 
27
#include "gcr-collection.h"
 
28
 
 
29
#include <glib-object.h>
 
30
 
 
31
G_BEGIN_DECLS
 
32
 
 
33
#define GCR_TYPE_CALLBACK_OUTPUT_STREAM               (_gcr_callback_output_stream_get_type ())
 
34
#define GCR_CALLBACK_OUTPUT_STREAM(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCR_TYPE_CALLBACK_OUTPUT_STREAM, GcrCallbackOutputStream))
 
35
#define GCR_CALLBACK_OUTPUT_STREAM_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GCR_TYPE_CALLBACK_OUTPUT_STREAM, GcrCallbackOutputStreamClass))
 
36
#define GCR_IS_CALLBACK_OUTPUT_STREAM(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCR_TYPE_CALLBACK_OUTPUT_STREAM))
 
37
#define GCR_IS_CALLBACK_OUTPUT_STREAM_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GCR_TYPE_CALLBACK_OUTPUT_STREAM))
 
38
#define GCR_CALLBACK_OUTPUT_STREAM_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GCR_TYPE_CALLBACK_OUTPUT_STREAM, GcrCallbackOutputStreamClass))
 
39
 
 
40
typedef struct _GcrCallbackOutputStream GcrCallbackOutputStream;
 
41
typedef struct _GcrCallbackOutputStreamClass GcrCallbackOutputStreamClass;
 
42
 
 
43
GType               _gcr_callback_output_stream_get_type   (void);
 
44
 
 
45
typedef gssize      (*GcrCallbackOutputFunc)               (gconstpointer buffer,
 
46
                                                            gsize count,
 
47
                                                            GCancellable *cancellable,
 
48
                                                            gpointer user_data,
 
49
                                                            GError **error);
 
50
 
 
51
GOutputStream *     _gcr_callback_output_stream_new        (GcrCallbackOutputFunc callback,
 
52
                                                            gpointer user_data,
 
53
                                                            GDestroyNotify destroy_func);
 
54
 
 
55
G_END_DECLS
 
56
 
 
57
#endif /* GCR_CALLBACK_OUTPUT_STREAM_H */