[glibmm/glibmm-2-56] Gio::DataInputStream: Deprecate read_until() and friends
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/glibmm-2-56] Gio::DataInputStream: Deprecate read_until() and friends
- Date: Tue, 20 Mar 2018 19:21:21 +0000 (UTC)
commit a9fd913b509117da3f754eb72aaef6edab5f26ac
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Mar 20 20:15:50 2018 +0100
Gio::DataInputStream: Deprecate read_until() and friends
Deprecate read_until(), read_until_async() and read_until_finish().
The corresponding glib functions have been deprecated.
gio/src/datainputstream.ccg | 2 ++
gio/src/datainputstream.hg | 27 ++++++++++++++-------------
2 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/gio/src/datainputstream.ccg b/gio/src/datainputstream.ccg
index f919720..6291141 100644
--- a/gio/src/datainputstream.ccg
+++ b/gio/src/datainputstream.ccg
@@ -93,6 +93,7 @@ DataInputStream::read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::
return retval;
}
+_DEPRECATE_IFDEF_START
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
bool
DataInputStream::read_until(
@@ -169,6 +170,7 @@ DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result, std:
return retval;
}
G_GNUC_END_IGNORE_DEPRECATIONS
+_DEPRECATE_IFDEF_END
bool
DataInputStream::read_upto(
diff --git a/gio/src/datainputstream.hg b/gio/src/datainputstream.hg
index a06b90e..bac690d 100644
--- a/gio/src/datainputstream.hg
+++ b/gio/src/datainputstream.hg
@@ -138,7 +138,7 @@ public:
*/
_WRAP_METHOD(void read_line_finish_utf8(const Glib::RefPtr<AsyncResult>& result{.}, std::string&
data{OUT}, gsize& length{.?}), g_data_input_stream_read_line_finish_utf8, errthrow)
- //TODO: This has been really deprecated in glib 2.56.
+_DEPRECATE_IFDEF_START
/** Reads a string from the data input stream, up to the first
* occurrence of any of the stop characters.
*
@@ -146,8 +146,7 @@ public:
* this function consumes the stop character that it finds.
*
* Don't use this function in new code. Its functionality is
- * inconsistent with read_until_async(). Both
- * functions will be marked as deprecated in a future release. Use
+ * inconsistent with read_until_async(). Use
* read_upto() instead, but note that that method
* does not consume the stop character.
*
@@ -155,59 +154,61 @@ public:
* @param stop_chars Characters to terminate the read.
* @param cancellable A cancellable object.
* @result true if the read succeeded without error.
+ *
+ * @deprecated Use read_upto() instead, which has more consistent behaviour regarding the stop character.
*/
bool read_until(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>&
cancellable);
_IGNORE(g_data_input_stream_read_until)
- //TODO: This has been really deprecated in glib 2.56.
/** A non-cancellable version of read_until().
*
* Note that, in contrast to read_until_async(),
* this function consumes the stop character that it finds.
*
* Don't use this function in new code. Its functionality is
- * inconsistent with read_until_async(). Both
- * functions will be marked as deprecated in a future release. Use
+ * inconsistent with read_until_async(). Use
* read_upto() instead, but note that that method
* does not consume the stop character.
*
* @param[out] data A string to fill with the read data.
* @param stop_chars Characters to terminate the read.
* @result true if the read succeeded without error.
+ *
+ * @deprecated Use read_upto() instead, which has more consistent behaviour regarding the stop character.
*/
bool read_until(std::string& data, const std::string& stop_chars);
- //TODO: This has been really deprecated in glib 2.56.
/** The asynchronous version of read_until(). It is
* an error to have two outstanding calls to this function.
*
- * Note that, in contrast to ead_until(),
+ * Note that, in contrast to read_until(),
* this function does not consume the stop character that it finds. You
* must read it for yourself.
*
* Don't use this function in new code. Its functionality is
- * inconsistent with read_until(). Both functions
- * will be marked as deprecated in a future release. Use
- * read_upto_async() instead.
+ * inconsistent with read_until(). Use read_upto_async() instead.
*
* @param stop_chars Characters to terminate the read.
* @param slot The slot to call when the request is satisfied.
* @param cancellable A cancellable object.
* @param io_priority The I/O priority of the request.
+ *
+ * @deprecated Use read_upto_async() instead, which has more consistent behaviour regarding the stop
character.
*/
void read_until_async(const std::string& stop_chars, const SlotAsyncReady& slot, const
Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
_IGNORE(g_data_input_stream_read_until_async)
- //TODO: This has been really deprecated in glib 2.56.
/** Finish an asynchronous call started by read_until_async().
*
* @param result The AsyncResult that was provided to the callback slot.
* @param[out] data A string to fill with the read data.
* @result true if the read succeeded without error.
+ *
+ * @deprecated Use read_upto_finish() instead, which has more consistent behaviour regarding the stop
character.
*/
bool read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
_IGNORE(g_data_input_stream_read_until_finish)
-
+_DEPRECATE_IFDEF_END
/** Reads a string from the data input stream, up to the first
* occurrence of any of the stop characters.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]