Gio::FileInputStream Class Reference
[Stream Classes]

FileInputStream provides input streams that take their content from a file. More...

#include <giomm/fileinputstream.h>

Inheritance diagram for Gio::FileInputStream:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~FileInputStream ()
GFileInputStream* gobj ()
 Provides access to the underlying C GObject.
const GFileInputStream* gobj () const
 Provides access to the underlying C GObject.
GFileInputStream* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::RefPtr< FileInfoquery_info (const Glib::RefPtr< Cancellable >& cancellable, const std::string& attributes="*")
 Queries a file input stream the given attributes.
Glib::RefPtr< FileInfoquery_info (const std::string& attributes="*")
 Queries a file input stream the given attributes.
void query_info_async (const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, const std::string& attributes="*", int io_priority=Glib::PRIORITY_DEFAULT)
 Queries the stream information asynchronously.
void query_info_async (const SlotAsyncReady& slot, const std::string& attributes="*", int io_priority=Glib::PRIORITY_DEFAULT)
 Queries the stream information asynchronously.
Glib::RefPtr< FileInfoquery_info_finish (const Glib::RefPtr< AsyncResult >& result)
 Finishes an asynchronous info query operation.

Related Functions

(Note that these are not member functions.)



Glib::RefPtr
< Gio::FileInputStream
wrap (GFileInputStream* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Detailed Description

FileInputStream provides input streams that take their content from a file.

FileInputStream implements Seekable, which allows the input stream to jump to arbitrary positions in the file, provided the file system of the file allows it. Use the methods of the Seekable base class for seeking and positioning.

Since glibmm 2.16:

Constructor & Destructor Documentation

virtual Gio::FileInputStream::~FileInputStream (  )  [virtual]

Member Function Documentation

const GFileInputStream* Gio::FileInputStream::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gio::InputStream.

GFileInputStream* Gio::FileInputStream::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gio::InputStream.

GFileInputStream* Gio::FileInputStream::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gio::InputStream.

Glib::RefPtr<FileInfo> Gio::FileInputStream::query_info ( const std::string attributes = "*"  ) 

Queries a file input stream the given attributes.

This function blocks while querying the stream. For the asynchronous (non-blocking) version of this function, see query_info_async(). While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will throw a Gio::Error with PENDING.

Parameters:
attributes A file attribute query string.
Returns:
A FileInfo, or an empty RefPtr on error.
Glib::RefPtr<FileInfo> Gio::FileInputStream::query_info ( const Glib::RefPtr< Cancellable >&  cancellable,
const std::string attributes = "*" 
)

Queries a file input stream the given attributes.

This function blocks while querying the stream. For the asynchronous (non-blocking) version of this function, see query_info_async(). While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will throw a Gio::Error with PENDING.

Parameters:
attributes A file attribute query string.
cancellable A Cancellable object.
Returns:
A FileInfo, or an empty RefPtr on error.
void Gio::FileInputStream::query_info_async ( const SlotAsyncReady slot,
const std::string attributes = "*",
int  io_priority = Glib::PRIORITY_DEFAULT 
)

Queries the stream information asynchronously.

For the synchronous version of this function, see query_info().

When the operation is finished, slot will be called. You can then call query_info_finish() to get the result of the operation.

Parameters:
slot A callback slot which will be called when the request is satisfied.
attributes A file attribute query string.
io_priority The I/O priority of the request.
void Gio::FileInputStream::query_info_async ( const SlotAsyncReady slot,
const Glib::RefPtr< Cancellable >&  cancellable,
const std::string attributes = "*",
int  io_priority = Glib::PRIORITY_DEFAULT 
)

Queries the stream information asynchronously.

For the synchronous version of this function, see query_info().

The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a Gio::Error with CANCELLED will be thrown.

When the operation is finished, slot will be called. You can then call query_info_finish() to get the result of the operation.

Parameters:
slot A callback slot which will be called when the request is satisfied.
cancellable A Cancellable object which can be used to cancel the operation.
attributes A file attribute query string.
io_priority The I/O priority of the request.
Glib::RefPtr<FileInfo> Gio::FileInputStream::query_info_finish ( const Glib::RefPtr< AsyncResult >&  result  ) 

Finishes an asynchronous info query operation.

Parameters:
result A AsyncResult.
Returns:
FileInfo.

Friends And Related Function Documentation

Glib::RefPtr< Gio::FileInputStream > wrap ( GFileInputStream *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.

Generated on Mon May 3 23:46:27 2010 for glibmm by  doxygen 1.6.1