X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fprotocol.h;h=4afb0bf59165cb86890330bdaa1edf62db543c8c;hb=11916574f67962dce1d7a2fdf7ef6a3d2d1fa49f;hp=6af0ed21c65891e814008bc8c2cbde178f136d36;hpb=1031f333332cf1b09db4fd632f141143ee637c34;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/protocol.h b/include/protocol.h index 6af0ed21c..4afb0bf59 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -26,9 +26,21 @@ class User; typedef std::vector parameterlist; -class ProtocolInterface +class ProtocolServer { public: + /** Send metadata related to this server to the target server + * @param key The 'key' of the data + * @param data The string representation of the data + */ + virtual void SendMetaData(const std::string& key, const std::string& data) = 0; +}; + +class CoreExport ProtocolInterface +{ + public: + typedef ProtocolServer Server; + class ServerInfo { public: @@ -53,12 +65,25 @@ class ProtocolInterface */ virtual bool SendEncapsulatedData(const parameterlist &encap) { return false; } - /** Send metadata for an object to other linked servers. - * @param target The object to send metadata for. + /** Send metadata for a channel to other linked servers. + * @param chan The channel to send metadata for * @param key The 'key' of the data, e.g. "swhois" for swhois desc on a user * @param data The string representation of the data */ - virtual void SendMetaData(Extensible* target, const std::string &key, const std::string &data) { } + virtual void SendMetaData(Channel* chan, const std::string& key, const std::string& data) { } + + /** Send metadata for a user to other linked servers. + * @param user The user to send metadata for + * @param key The 'key' of the data, e.g. "swhois" for swhois desc on a user + * @param data The string representation of the data + */ + virtual void SendMetaData(User* user, const std::string& key, const std::string& data) { } + + /** Send metadata related to the server to other linked servers. + * @param key The 'key' of the data + * @param data The string representation of the data + */ + virtual void SendMetaData(const std::string& key, const std::string& data) { } /** Send a topic change for a channel * @param channel The channel to change the topic for. @@ -79,7 +104,7 @@ class ProtocolInterface * @param snomask The snomask required for the message to be sent. * @param text The message to send. */ - virtual void SendSNONotice(const std::string &snomask, const std::string &text) { } + virtual void SendSNONotice(char snomask, const std::string& text) { } /** Send raw data to a remote client. * @param target The user to push data to.