diff options
Diffstat (limited to 'glib/src/iochannel.hg')
-rw-r--r-- | glib/src/iochannel.hg | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/glib/src/iochannel.hg b/glib/src/iochannel.hg index f109235d..7edd0cab 100644 --- a/glib/src/iochannel.hg +++ b/glib/src/iochannel.hg @@ -109,7 +109,11 @@ public: * @return An IOChannel for the opened file. * @throw Glib::FileError */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED static Glib::RefPtr<IOChannel> create_from_file(const std::string& filename, const std::string& mode); +#else + static Glib::RefPtr<IOChannel> create_from_file(const std::string& filename, const std::string& mode, std::auto_ptr<Glib::Error>& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED _IGNORE(g_io_channel_new_file) /** Creates an I/O channel from a file descriptor. @@ -188,7 +192,11 @@ public: * @throw Glib::IOChannelError * @throw Glib::ConvertError */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED IOStatus read(Glib::ustring& str, gsize count); +#else + IOStatus read(Glib::ustring& str, gsize count, std::auto_ptr<Glib::Error>& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED /** Read a whole line. * Reads until the line separator is found, which is included @@ -198,7 +206,11 @@ public: * @throw Glib::IOChannelError * @throw Glib::ConvertError */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED IOStatus read_line(Glib::ustring& line); +#else + IOStatus read_line(Glib::ustring& line, std::auto_ptr<Glib::Error>& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED _IGNORE(g_io_channel_read_line, g_io_channel_read_line_string) /** Reads all the remaining data from the file. @@ -208,7 +220,11 @@ public: * @throw Glib::IOChannelError * @throw Glib::ConvertError */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED IOStatus read_to_end(Glib::ustring& str); +#else + IOStatus read_to_end(Glib::ustring& str, std::auto_ptr<Glib::Error>& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED _IGNORE(g_io_channel_read_to_end) /** Write a string to the I/O channel. @@ -220,7 +236,11 @@ public: * @throw Glib::IOChannelError * @throw Glib::ConvertError */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED IOStatus write(const Glib::ustring& str); +#else + IOStatus write(const Glib::ustring& str, std::auto_ptr<Glib::Error>& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED /** Write a memory area of @a count bytes to the I/O channel. * @param buf The start of the memory area. @@ -379,7 +399,11 @@ public: * @return Glib::IO_STATUS_NORMAL if the encoding was successfully set. * @throw Glib::IOChannelError */ +#ifdef GLIBMM_EXCEPTIONS_ENABLED IOStatus set_encoding(const std::string& encoding = std::string()); +#else + IOStatus set_encoding(const std::string& encoding, std::auto_ptr<Glib::Error>& error); +#endif //GLIBMM_EXCEPTIONS_ENABLED _IGNORE(g_io_channel_set_encoding) /** Get the encoding of the I/O channel. |