drop back to c++20 and use tl::optional

master
bqv 3 years ago
parent 1af059ee3a
commit c0efb9f632
No known key found for this signature in database
GPG Key ID: 9E2FF3BDEBDFC910

@ -1,543 +0,0 @@
.plugin.o: plugin.cpp plugin.hh config.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h connection.hh command.hh input.hh buffer.hh \
completion.hh
plugin.hh:
config.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
connection.hh:
command.hh:
input.hh:
buffer.hh:
completion.hh:
.account.o: account.cpp /usr/include/libxml2/libxml/xmlwriter.h \
/usr/include/libxml2/libxml/xmlversion.h \
/usr/include/libxml2/libxml/xmlexports.h \
/usr/include/libxml2/libxml/xmlIO.h \
/usr/include/libxml2/libxml/globals.h \
/usr/include/libxml2/libxml/parser.h /usr/include/libxml2/libxml/tree.h \
/usr/include/libxml2/libxml/xmlstring.h \
/usr/include/libxml2/libxml/xmlregexp.h \
/usr/include/libxml2/libxml/dict.h /usr/include/libxml2/libxml/hash.h \
/usr/include/libxml2/libxml/valid.h \
/usr/include/libxml2/libxml/xmlerror.h \
/usr/include/libxml2/libxml/list.h \
/usr/include/libxml2/libxml/xmlautomata.h \
/usr/include/libxml2/libxml/entities.h \
/usr/include/libxml2/libxml/encoding.h \
/usr/include/libxml2/libxml/SAX2.h /usr/include/libxml2/libxml/xlink.h \
/usr/include/libxml2/libxml/xmlmemory.h \
/usr/include/libxml2/libxml/threads.h plugin.hh xmpp/stanza.hh config.hh \
input.hh omemo.hh /usr/include/signal/signal_protocol.h \
/usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h account.hh connection.hh user.hh channel.hh \
buffer.hh
/usr/include/libxml2/libxml/xmlwriter.h:
/usr/include/libxml2/libxml/xmlversion.h:
/usr/include/libxml2/libxml/xmlexports.h:
/usr/include/libxml2/libxml/xmlIO.h:
/usr/include/libxml2/libxml/globals.h:
/usr/include/libxml2/libxml/parser.h:
/usr/include/libxml2/libxml/tree.h:
/usr/include/libxml2/libxml/xmlstring.h:
/usr/include/libxml2/libxml/xmlregexp.h:
/usr/include/libxml2/libxml/dict.h:
/usr/include/libxml2/libxml/hash.h:
/usr/include/libxml2/libxml/valid.h:
/usr/include/libxml2/libxml/xmlerror.h:
/usr/include/libxml2/libxml/list.h:
/usr/include/libxml2/libxml/xmlautomata.h:
/usr/include/libxml2/libxml/entities.h:
/usr/include/libxml2/libxml/encoding.h:
/usr/include/libxml2/libxml/SAX2.h:
/usr/include/libxml2/libxml/xlink.h:
/usr/include/libxml2/libxml/xmlmemory.h:
/usr/include/libxml2/libxml/threads.h:
plugin.hh:
xmpp/stanza.hh:
config.hh:
input.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
account.hh:
connection.hh:
user.hh:
channel.hh:
buffer.hh:
.buffer.o: buffer.cpp plugin.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h channel.hh buffer.hh
plugin.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
channel.hh:
buffer.hh:
.channel.o: channel.cpp deps/fmt/include/fmt/core.h plugin.hh account.hh \
omemo.hh /usr/include/signal/signal_protocol.h \
/usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
/usr/include/signal/key_helper.h /usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h user.hh channel.hh input.hh buffer.hh pgp.hh \
util.hh xmpp/node.hh xmpp/xep-0027.inl xmpp/ns.hh xmpp/xep-0030.inl \
xmpp/xep-0045.inl xmpp/xep-0049.inl xmpp/xep-0115.inl xmpp/xep-0280.inl \
xmpp/xep-0319.inl xmpp/rfc-6121.inl
deps/fmt/include/fmt/core.h:
plugin.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
user.hh:
channel.hh:
input.hh:
buffer.hh:
pgp.hh:
util.hh:
xmpp/node.hh:
xmpp/xep-0027.inl:
xmpp/ns.hh:
xmpp/xep-0030.inl:
xmpp/xep-0045.inl:
xmpp/xep-0049.inl:
xmpp/xep-0115.inl:
xmpp/xep-0280.inl:
xmpp/xep-0319.inl:
xmpp/rfc-6121.inl:
.command.o: command.cpp plugin.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h user.hh channel.hh buffer.hh message.hh \
command.hh sexp/driver.hh sexp/scanner.hh sexp/parser.tab.hh \
sexp/location.hh
plugin.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
user.hh:
channel.hh:
buffer.hh:
message.hh:
command.hh:
sexp/driver.hh:
sexp/scanner.hh:
sexp/parser.tab.hh:
sexp/location.hh:
.completion.o: completion.cpp plugin.hh config.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h channel.hh user.hh buffer.hh completion.hh
plugin.hh:
config.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
channel.hh:
user.hh:
buffer.hh:
completion.hh:
.config.o: config.cpp plugin.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h config.hh
plugin.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
config.hh:
.connection.o: connection.cpp deps/fmt/include/fmt/core.h \
deps/fmt/include/fmt/chrono.h deps/fmt/include/fmt/format.h \
deps/fmt/include/fmt/core.h /usr/include/libxml2/libxml/uri.h \
/usr/include/libxml2/libxml/xmlversion.h \
/usr/include/libxml2/libxml/xmlexports.h \
/usr/include/libxml2/libxml/tree.h \
/usr/include/libxml2/libxml/xmlstring.h \
/usr/include/libxml2/libxml/xmlregexp.h \
/usr/include/libxml2/libxml/dict.h \
/usr/include/libxml2/libxml/xmlmemory.h \
/usr/include/libxml2/libxml/threads.h \
/usr/include/libxml2/libxml/globals.h \
/usr/include/libxml2/libxml/parser.h /usr/include/libxml2/libxml/hash.h \
/usr/include/libxml2/libxml/valid.h \
/usr/include/libxml2/libxml/xmlerror.h \
/usr/include/libxml2/libxml/list.h \
/usr/include/libxml2/libxml/xmlautomata.h \
/usr/include/libxml2/libxml/entities.h \
/usr/include/libxml2/libxml/encoding.h \
/usr/include/libxml2/libxml/xmlIO.h /usr/include/libxml2/libxml/SAX2.h \
/usr/include/libxml2/libxml/xlink.h plugin.hh xmpp/node.hh \
xmpp/xep-0027.inl xmpp/ns.hh xmpp/xep-0030.inl xmpp/xep-0045.inl \
xmpp/xep-0049.inl xmpp/xep-0115.inl xmpp/xep-0280.inl xmpp/xep-0319.inl \
xmpp/rfc-6121.inl xmpp/stanza.hh config.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
/usr/include/signal/key_helper.h /usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h user.hh channel.hh connection.hh pgp.hh \
util.hh deps/diff/diff.h
deps/fmt/include/fmt/core.h:
deps/fmt/include/fmt/chrono.h:
deps/fmt/include/fmt/format.h:
deps/fmt/include/fmt/core.h:
/usr/include/libxml2/libxml/uri.h:
/usr/include/libxml2/libxml/xmlversion.h:
/usr/include/libxml2/libxml/xmlexports.h:
/usr/include/libxml2/libxml/tree.h:
/usr/include/libxml2/libxml/xmlstring.h:
/usr/include/libxml2/libxml/xmlregexp.h:
/usr/include/libxml2/libxml/dict.h:
/usr/include/libxml2/libxml/xmlmemory.h:
/usr/include/libxml2/libxml/threads.h:
/usr/include/libxml2/libxml/globals.h:
/usr/include/libxml2/libxml/parser.h:
/usr/include/libxml2/libxml/hash.h:
/usr/include/libxml2/libxml/valid.h:
/usr/include/libxml2/libxml/xmlerror.h:
/usr/include/libxml2/libxml/list.h:
/usr/include/libxml2/libxml/xmlautomata.h:
/usr/include/libxml2/libxml/entities.h:
/usr/include/libxml2/libxml/encoding.h:
/usr/include/libxml2/libxml/xmlIO.h:
/usr/include/libxml2/libxml/SAX2.h:
/usr/include/libxml2/libxml/xlink.h:
plugin.hh:
xmpp/node.hh:
xmpp/xep-0027.inl:
xmpp/ns.hh:
xmpp/xep-0030.inl:
xmpp/xep-0045.inl:
xmpp/xep-0049.inl:
xmpp/xep-0115.inl:
xmpp/xep-0280.inl:
xmpp/xep-0319.inl:
xmpp/rfc-6121.inl:
xmpp/stanza.hh:
config.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
user.hh:
channel.hh:
connection.hh:
pgp.hh:
util.hh:
deps/diff/diff.h:
.input.o: input.cpp plugin.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h channel.hh buffer.hh message.hh input.hh
plugin.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
channel.hh:
buffer.hh:
message.hh:
input.hh:
.message.o: message.cpp plugin.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h channel.hh user.hh message.hh
plugin.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
channel.hh:
user.hh:
message.hh:
.omemo.o: omemo.cpp deps/fmt/include/fmt/core.h plugin.hh xmpp/stanza.hh \
account.hh omemo.hh /usr/include/signal/signal_protocol.h \
/usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
/usr/include/signal/key_helper.h /usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h gcrypt.hh util.hh
deps/fmt/include/fmt/core.h:
plugin.hh:
xmpp/stanza.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
gcrypt.hh:
util.hh:
.pgp.o: pgp.cpp plugin.hh pgp.hh
plugin.hh:
pgp.hh:
.user.o: user.cpp plugin.hh account.hh omemo.hh \
/usr/include/signal/signal_protocol.h /usr/include/signal/ratchet.h \
/usr/include/signal/signal_protocol_types.h /usr/include/signal/curve.h \
/usr/include/signal/session_record.h \
/usr/include/signal/session_pre_key.h \
/usr/include/signal/sender_key_record.h signal.hh \
deps/fmt/include/fmt/core.h /usr/include/signal/key_helper.h \
/usr/include/signal/session_builder.h \
/usr/include/signal/session_cipher.h \
/usr/include/signal/session_pre_key.h /usr/include/signal/protocol.h \
/usr/include/signal/curve.h user.hh channel.hh
plugin.hh:
account.hh:
omemo.hh:
/usr/include/signal/signal_protocol.h:
/usr/include/signal/ratchet.h:
/usr/include/signal/signal_protocol_types.h:
/usr/include/signal/curve.h:
/usr/include/signal/session_record.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/sender_key_record.h:
signal.hh:
deps/fmt/include/fmt/core.h:
/usr/include/signal/key_helper.h:
/usr/include/signal/session_builder.h:
/usr/include/signal/session_cipher.h:
/usr/include/signal/session_pre_key.h:
/usr/include/signal/protocol.h:
/usr/include/signal/curve.h:
user.hh:
channel.hh:
.util.o: util.cpp plugin.hh util.hh
plugin.hh:
util.hh:
xmpp/.presence.o: xmpp/presence.cpp xmpp/stanza.hh
xmpp/stanza.hh:
xmpp/.iq.o: xmpp/iq.cpp xmpp/stanza.hh
xmpp/stanza.hh:
xmpp/.node.o: xmpp/node.cpp xmpp/node.hh deps/fmt/include/fmt/core.h \
xmpp/xep-0027.inl xmpp/ns.hh xmpp/xep-0030.inl xmpp/xep-0045.inl \
xmpp/xep-0049.inl xmpp/xep-0115.inl xmpp/xep-0280.inl xmpp/xep-0319.inl \
xmpp/rfc-6121.inl
xmpp/node.hh:
deps/fmt/include/fmt/core.h:
xmpp/xep-0027.inl:
xmpp/ns.hh:
xmpp/xep-0030.inl:
xmpp/xep-0045.inl:
xmpp/xep-0049.inl:
xmpp/xep-0115.inl:
xmpp/xep-0280.inl:
xmpp/xep-0319.inl:
xmpp/rfc-6121.inl:

1
.gitignore vendored

@ -3,6 +3,7 @@
compile_commands.json
.cache
cscope*
.depend
*.d
*.gcno
*.gcda

3
.gitmodules vendored

@ -4,3 +4,6 @@
[submodule "diff"]
path = deps/diff
url = https://github.com/kristapsdz/libdiff
[submodule "deps/optional"]
path = deps/optional
url = https://github.com/TartanLlama/optional

@ -9,6 +9,7 @@
#include <time.h>
#include <regex>
#include <fmt/core.h>
#include <tl/optional.hpp>
#include <strophe.h>
#include <weechat/weechat-plugin.h>
@ -1056,7 +1057,7 @@ struct t_channel_member *channel__remove_member(struct t_account *account,
int channel__send_message(struct t_account *account, struct t_channel *channel,
std::string to, std::string body,
std::optional<std::string> oob = {})
tl::optional<std::string> oob = {})
{
xmpp_stanza_t *message = xmpp_message_new(account->context,
channel->type == CHANNEL_TYPE_MUC

1
deps/optional vendored

@ -0,0 +1 @@
Subproject commit c28fcf74d207fc667c4ed3dbae4c251ea551c8c1

@ -5,10 +5,10 @@ endif
RM ?= rm -f
FIND ?= find
CC = $(if $(shell which gcc-12.0.1),gcc-12.0.1,cc)
CXX = $(if $(shell which g++-12.0.1),g++-12.0.1,c++)
CC = gcc
CXX = g++
INCLUDES=-Ilibstrophe -Ideps -Ideps/fmt/include \
INCLUDES=-Ilibstrophe -Ideps -Ideps/optional/include -Ideps/fmt/include \
$(shell xml2-config --cflags) \
$(shell pkg-config --cflags gpgme) \
$(shell pkg-config --cflags libsignal-protocol-c)
@ -25,7 +25,7 @@ CFLAGS+=$(DBGCFLAGS) \
CPPFLAGS+=$(DBGCFLAGS) -O0 \
-fno-omit-frame-pointer -fPIC \
-fvisibility=hidden -fvisibility-inlines-hidden \
-std=c++23 -gdwarf-4 -fkeep-inline-functions \
-std=c++20 -gdwarf-4 -fkeep-inline-functions \
-Wall -Wextra -pedantic \
-Wno-missing-field-initializers \
$(INCLUDES)

@ -16,6 +16,7 @@
#include <time.h>
#include <math.h>
#include <limits.h>
#include <tl/optional.hpp>
#include <strophe.h>
#include <weechat/weechat-plugin.h>
@ -1691,7 +1692,7 @@ int bks_store_bundle(struct signal_protocol_address *address,
return 0;
}
std::optional<libsignal::pre_key_bundle> bks_load_bundle(struct signal_protocol_address *address, t_omemo *omemo)
tl::optional<libsignal::pre_key_bundle> bks_load_bundle(struct signal_protocol_address *address, t_omemo *omemo)
{
std::string k_bundle_pk = fmt::format("bundle_pk_{}_{}", address->name, address->device_id);
std::string k_bundle_sk = fmt::format("bundle_sk_{}_{}", address->name, address->device_id);

@ -6,13 +6,14 @@
#include <optional>
#include <string>
#include <tl/optional.hpp>
struct t_user_profile
{
char *avatar_hash;
char *status_text;
char *status;
std::optional<std::string> idle;
tl::optional<std::string> idle;
char *display_name;
char *email;
char *role;

@ -26,7 +26,7 @@ std::string get_name(xmpp_stanza_t *stanza) {
return {};
}
std::optional<std::string> get_attribute(xmpp_stanza_t *stanza, const char *name) {
tl::optional<std::string> get_attribute(xmpp_stanza_t *stanza, const char *name) {
const char *result = NULL;
result = xmpp_stanza_get_attribute(stanza, name);
if (result)
@ -124,14 +124,14 @@ void xml::message::bind(xmpp_ctx_t *context, xmpp_stanza_t *stanza) {
node::bind(context, stanza);
}
std::optional<std::string> xml::presence::show() {
tl::optional<std::string> xml::presence::show() {
auto child = get_children("show");
if (child.size() > 0)
return child.front().get().text;
return {};
}
std::optional<std::string> xml::presence::status() {
tl::optional<std::string> xml::presence::status() {
auto child = get_children("status");
if (child.size() > 0)
return child.front().get().text;

@ -16,10 +16,11 @@
#include <variant>
#include <fmt/core.h>
#include <strophe.h>
#include <tl/optional.hpp>
std::string get_name(xmpp_stanza_t *stanza);
std::optional<std::string> get_attribute(xmpp_stanza_t *stanza, const char *name);
tl::optional<std::string> get_attribute(xmpp_stanza_t *stanza, const char *name);
std::string get_text(xmpp_stanza_t *stanza);
@ -59,10 +60,10 @@ namespace xml {
xmpp_ctx_t *context;
std::optional<std::string> name;
tl::optional<std::string> name;
std::optional<std::string> id;
std::optional<std::string> ns;
tl::optional<std::string> id;
tl::optional<std::string> ns;
std::map<std::string, std::string> attributes;
std::vector<node> children;
@ -71,7 +72,7 @@ namespace xml {
virtual void bind(xmpp_ctx_t *context, xmpp_stanza_t *stanza);
inline std::optional<std::string>
inline tl::optional<std::string>
get_attr(const std::string& name) {
auto attribute = attributes.find(name);
if (attribute != attributes.end())
@ -227,10 +228,10 @@ namespace xml {
bind(context, stanza);
}
std::optional<jid> from;
std::optional<jid> to;
tl::optional<jid> from;
tl::optional<jid> to;
std::optional<std::string> type;
tl::optional<std::string> type;
void bind(xmpp_ctx_t *context, xmpp_stanza_t *stanza) override;
};
@ -242,13 +243,13 @@ namespace xml {
bind(context, stanza);
}
std::optional<jid> from;
std::optional<jid> to;
tl::optional<jid> from;
tl::optional<jid> to;
std::optional<std::string> type;
tl::optional<std::string> type;
std::optional<std::string> show();
std::optional<std::string> status();
tl::optional<std::string> show();
tl::optional<std::string> status();
void bind(xmpp_ctx_t *context, xmpp_stanza_t *stanza) override;
};
@ -259,10 +260,10 @@ namespace xml {
bind(context, stanza);
}
std::optional<jid> from;
std::optional<jid> to;
tl::optional<jid> from;
tl::optional<jid> to;
std::optional<std::string> type;
tl::optional<std::string> type;
void bind(xmpp_ctx_t *context, xmpp_stanza_t *stanza) override;
};
@ -273,8 +274,8 @@ namespace xml {
bind(context, stanza);
}
std::optional<jid> from;
std::optional<jid> to;
tl::optional<jid> from;
tl::optional<jid> to;
void bind(xmpp_ctx_t *context, xmpp_stanza_t *stanza) override;
};

@ -17,29 +17,29 @@ namespace xml {
/* Current Jabber OpenPGP Usage */
class xep0027 : virtual public node {
private:
std::optional<std::optional<std::string>> _signature;
std::optional<std::optional<std::string>> _encrypted;
tl::optional<tl::optional<std::string>> _signature;
tl::optional<tl::optional<std::string>> _encrypted;
public:
std::optional<std::string>& signature() {
tl::optional<std::string>& signature() {
if (!_signature)
{
auto child = get_children<jabber::x::signed_>("x");
if (child.size() > 0)
_signature = child.front().get().text;
else
_signature.emplace(std::nullopt);
_signature.emplace(tl::nullopt);
}
return *_signature;
}
std::optional<std::string>& encrypted() {
tl::optional<std::string>& encrypted() {
if (!_encrypted)
{
auto child = get_children<jabber::x::encrypted>("x");
if (child.size() > 0)
_encrypted = child.front().get().text;
else
_encrypted.emplace(std::nullopt);
_encrypted.emplace(tl::nullopt);
}
return *_encrypted;
}

@ -108,8 +108,8 @@ namespace xml {
};
std::string reason;
std::optional<jid> from;
std::optional<jid> to;
tl::optional<jid> from;
tl::optional<jid> to;
};
struct destroy {
@ -121,7 +121,7 @@ namespace xml {
};
std::string reason;
std::optional<jid> target;
tl::optional<jid> target;
};
struct invite {
@ -135,8 +135,8 @@ namespace xml {
};
std::string reason;
std::optional<jid> from;
std::optional<jid> to;
tl::optional<jid> from;
tl::optional<jid> to;
};
class item {
@ -152,7 +152,7 @@ namespace xml {
}
std::string reason;
std::optional<jid> target;
tl::optional<jid> target;
std::string nick;
};
@ -186,10 +186,10 @@ namespace xml {
std::vector<actor> actors;
std::vector<continue_> continues;
std::string reason;
std::optional<enum affiliation> affiliation;
std::optional<jid> target;
std::optional<std::string> nick;
std::optional<enum role> role;
tl::optional<enum affiliation> affiliation;
tl::optional<jid> target;
tl::optional<std::string> nick;
tl::optional<enum role> role;
};
public:
@ -300,10 +300,10 @@ namespace xml {
description = child.get().text;
}
std::optional<jid> by;
std::optional<enum action> type;
std::optional<enum condition> condition;
std::optional<std::string> description;
tl::optional<jid> by;
tl::optional<enum action> type;
tl::optional<enum condition> condition;
tl::optional<std::string> description;
const char* reason() {
if (condition)
@ -331,9 +331,9 @@ namespace xml {
};
private:
std::optional<bool> _muc;
std::optional<std::optional<x>> _muc_user;
std::optional<std::optional<error>> _error;
tl::optional<bool> _muc;
tl::optional<tl::optional<x>> _muc_user;
tl::optional<tl::optional<error>> _error;
public:
bool muc() {
if (!_muc)
@ -344,26 +344,26 @@ namespace xml {
return *_muc;
}
std::optional<x>& muc_user() {
tl::optional<x>& muc_user() {
if (!_muc_user)
{
auto child = get_children<jabber_org::protocol::muc::user>("x");
if (child.size() > 0)
_muc_user = child.front().get();
else
_muc_user.emplace(std::nullopt);
_muc_user.emplace(tl::nullopt);
}
return *_muc_user;
}
std::optional<error>& error() {
tl::optional<error>& error() {
if (!_error)
{
auto child = get_children("error");
if (child.size() > 0)
_error = child.front().get();
else
_error.emplace(std::nullopt);
_error.emplace(tl::nullopt);
}
return *_error;
}

@ -29,23 +29,23 @@ namespace xml{
verification = *attr;
};
std::optional<std::string> ext;
tl::optional<std::string> ext;
std::string hashalgo;
std::string node;
std::string verification;
};
private:
std::optional<std::optional<caps>> _capabilities;
tl::optional<tl::optional<caps>> _capabilities;
public:
std::optional<caps> capabilities() {
tl::optional<caps> capabilities() {
if (!_capabilities)
{
auto child = get_children<jabber_org::protocol::caps>("c");
if (child.size() > 0)
_capabilities = caps(child.front().get());
else
_capabilities.emplace(std::nullopt);
_capabilities.emplace(tl::nullopt);
}
return *_capabilities;
}

@ -19,24 +19,24 @@ namespace xml {
/* Last User Interaction in Presence */
class xep0319 : virtual public node {
private:
std::optional<std::optional<std::chrono::system_clock::time_point>> _idle_since;
tl::optional<tl::optional<std::chrono::system_clock::time_point>> _idle_since;
public:
std::optional<std::chrono::system_clock::time_point> idle_since() {
tl::optional<std::chrono::system_clock::time_point> idle_since() {
if (!_idle_since)
{
auto children = get_children<urn::xmpp::idle::_1>("idle");
if (children.size() <= 0)
_idle_since.emplace(std::nullopt);
_idle_since.emplace(tl::nullopt);
else {
auto since = children.front().get().get_attr("since");
if (!since)
_idle_since.emplace(std::nullopt);
_idle_since.emplace(tl::nullopt);
else {
try {
_idle_since = get_time(*since);
}
catch (const std::invalid_argument& ex) {
_idle_since.emplace(std::nullopt);
_idle_since.emplace(tl::nullopt);
}
}
}

Loading…
Cancel
Save