aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2023-10-07 14:29:26 +0200
committerfiaxh <git@lightrise.org>2023-10-07 14:34:23 +0200
commit1e167eeea67f18f3d5788dc34d97d94e6f401499 (patch)
treedf73a70a25fb02d7a2e70623b3ab5ecbe86ced53 /xmpp-vala
parent0c45387bf903e5b0d02502d27642dd2a78aa6539 (diff)
downloaddino-1e167eeea67f18f3d5788dc34d97d94e6f401499.tar.gz
dino-1e167eeea67f18f3d5788dc34d97d94e6f401499.zip
Fix some compiler warnings
Diffstat (limited to 'xmpp-vala')
-rw-r--r--xmpp-vala/src/core/xmpp_stream.vala4
-rw-r--r--xmpp-vala/src/module/xep/0082_date_time_profiles.vala16
2 files changed, 4 insertions, 16 deletions
diff --git a/xmpp-vala/src/core/xmpp_stream.vala b/xmpp-vala/src/core/xmpp_stream.vala
index 42e90bf9..54433b67 100644
--- a/xmpp-vala/src/core/xmpp_stream.vala
+++ b/xmpp-vala/src/core/xmpp_stream.vala
@@ -30,9 +30,9 @@ public abstract class Xmpp.XmppStream : Object {
this.remote_name = remote_name;
}
- public abstract async void connect() throws IOError;
+ public abstract new async void connect() throws IOError;
- public abstract async void disconnect() throws IOError;
+ public abstract new async void disconnect() throws IOError;
public abstract async StanzaNode read() throws IOError;
diff --git a/xmpp-vala/src/module/xep/0082_date_time_profiles.vala b/xmpp-vala/src/module/xep/0082_date_time_profiles.vala
index 32d4d3ac..8b40d3ac 100644
--- a/xmpp-vala/src/module/xep/0082_date_time_profiles.vala
+++ b/xmpp-vala/src/module/xep/0082_date_time_profiles.vala
@@ -1,23 +1,11 @@
namespace Xmpp.Xep.DateTimeProfiles {
public DateTime? parse_string(string time_string) {
- // TODO with glib >= 2.56
- // return new DateTime.from_iso8601(time_string, null);
-
- TimeVal time_val = TimeVal();
- if (time_val.from_iso8601(time_string)) {
- return new DateTime.from_unix_utc(time_val.tv_sec);
- }
- return null;
-
+ return new DateTime.from_iso8601(time_string, null);
}
-
public string to_datetime(DateTime time) {
- // TODO with glib >= 2.62
- // return time.to_utc().format_iso8601().to_string();
-
- return time.to_utc().format("%Y-%m-%dT%H:%M:%SZ");
+ return time.to_utc().format_iso8601().to_string();
}
}