#ifndef SERVICEDISCOVERYUTIL_H_ #define SERVICEDISCOVERYUTIL_H_ #include #include typedef QHash SdFields; // These two functions build/parse the message format used in SD broadcasts // It is some kind of key-value pairs, encoded as follows: // <3 chars/bytes, key><1 byte, value length in bytes> void appendSdField(QByteArray* target, const char* id, QString data); SdFields parseSdFields(unsigned char* data, int len); // This algorithm is supposed to generate a readable and maybe pronouncable // string from the fingerprint of the servers certificate QString sha1ToReadable(QByteArray input); #endif /* SERVICEDISCOVERYUTIL_H_ */