~ubuntu-branches/ubuntu/trusty/glibmm2.4/trusty

« back to all changes in this revision

Viewing changes to gio/src/pollableinputstream.hg

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-28 12:28:45 UTC
  • mfrom: (1.2.77)
  • Revision ID: package-import@ubuntu.com-20120928122845-6h032jivploan2aa
Tags: 2.33.13-0ubuntu2
* debian/rules:
  - Bump shlib version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
2
 
 
3
/* Copyright (C) 2012 The giomm Development Team
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Lesser General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2.1 of the License, or (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 GNU
 
13
 * Lesser General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Lesser General Public
 
16
 * License along with this library; if not, write to the Free
 
17
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
 */
 
19
 
 
20
#include <glibmm/interface.h>
 
21
 
 
22
_DEFS(giomm,gio)
 
23
_PINCLUDE(glibmm/private/interface_p.h)
 
24
_PINCLUDE(gio/gio.h)
 
25
 
 
26
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
27
typedef struct _GPollableInputStreamInterface GPollableInputStreamInterface;
 
28
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
29
 
 
30
namespace Gio
 
31
{
 
32
 
 
33
class Cancellable;
 
34
 
 
35
/** PollableInputStream - Interface for pollable input streams.
 
36
 * PollableInputStream is implemented by InputStreams that can be polled for
 
37
 * readiness to read. This can be used when interfacing with a non-GIO API that
 
38
 * expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
 
39
 * @newin{2,34}
 
40
 */
 
41
class PollableInputStream : public Glib::Interface
 
42
{
 
43
  _CLASS_INTERFACE(PollableInputStream, GPollableInputStream, G_POLLABLE_INPUT_STREAM, GPollableInputStreamInterface)
 
44
 
 
45
public:
 
46
  _WRAP_METHOD(bool can_poll() const, g_pollable_input_stream_can_poll)
 
47
  _WRAP_METHOD(bool is_readable() const, g_pollable_input_stream_is_readable)
 
48
 
 
49
  //TODO: _WRAP_METHOD(Glib::RefPtr<Source> create_source(const Glib::RefPtr<Cancellable>& cancellable), g_pollable_input_stream_create_source)
 
50
 
 
51
  _WRAP_METHOD(gssize read_nonblocking(void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable{?}), g_pollable_input_stream_read_nonblocking, errthrow)
 
52
 
 
53
  _WRAP_VFUNC(bool can_poll() const, "can_poll")
 
54
  _WRAP_VFUNC(bool is_readable() const, "is_readable")
 
55
 
 
56
  //TODO: _WRAP_VFUNC(Glib::RefPtr<Source> create_source(const Glib::RefPtr<Cancellable>& cancellable), "create_source")
 
57
 
 
58
  _WRAP_VFUNC(gssize read_nonblocking(void* buffer, gsize count), "read_nonblocking", errthrow)
 
59
};
 
60
 
 
61
} // namespace Gio