X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Ftransport.h;h=d7164fa44535574d880d7ac2b6a406aa5e9712f7;hb=495ea4be05859f46cbf99c10541210fa3590f01a;hp=4d303502e7d5ba5e849a579c5970248a14f2b6ad;hpb=c015aa4c0e1cfc031109c18af497cca9a72c844c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/transport.h b/src/modules/transport.h index 4d303502e..d7164fa44 100644 --- a/src/modules/transport.h +++ b/src/modules/transport.h @@ -1,5 +1,18 @@ -#ifndef __SSL_CERT_H__ -#define __SSL_CERT_H__ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + +#ifndef __TRANSPORT_H__ +#define __TRANSPORT_H__ #include #include @@ -21,7 +34,7 @@ typedef ssl_data::iterator ssl_data_iter; * connected local users using Extensible::Extend() and the * key 'ssl_cert'. */ -class ssl_cert +class ssl_cert : public Extensible { /** Always contains an empty string */ @@ -37,7 +50,7 @@ class ssl_cert ssl_cert() : empty("") { } - + /** Get certificate distinguished name * @return Certificate DN */ @@ -149,60 +162,69 @@ class ssl_cert } }; +/** Used to represent a request to a transport provider module + */ class ISHRequest : public Request { public: - InspSocket* Sock; + BufferedSocket* Sock; - ISHRequest(Module* Me, Module* Target, const char* rtype, InspSocket* sock) : Request(Me, Target, rtype), Sock(sock) + ISHRequest(Module* Me, Module* Target, const char* rtype, BufferedSocket* sock) : Request(Me, Target, rtype), Sock(sock) { } }; -class InspSocketAttachCertRequest : public ISHRequest +/** Used to represent a request to attach a cert to an BufferedSocket + */ +class BufferedSocketAttachCertRequest : public ISHRequest { public: /** Initialize the request as an attach cert message */ - InspSocketAttachCertRequest(InspSocket* is, Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_ATTACH", is) + BufferedSocketAttachCertRequest(BufferedSocket* is, Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_ATTACH", is) { } }; -class InspSocketHSCompleteRequest : public ISHRequest +/** Used to check if a handshake is complete on an BufferedSocket yet + */ +class BufferedSocketHSCompleteRequest : public ISHRequest { public: /** Initialize the request as a 'handshake complete?' message */ - InspSocketHSCompleteRequest(InspSocket* is, Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_HSDONE", is) + BufferedSocketHSCompleteRequest(BufferedSocket* is, Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_HSDONE", is) { } }; -class InspSocketHookRequest : public ISHRequest +/** Used to hook a transport provider to an BufferedSocket + */ +class BufferedSocketHookRequest : public ISHRequest { public: /** Initialize request as a hook message */ - InspSocketHookRequest(InspSocket* is, Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_HOOK", is) + BufferedSocketHookRequest(BufferedSocket* is, Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_HOOK", is) { } }; -class InspSocketUnhookRequest : public ISHRequest +/** Used to unhook a transport provider from an BufferedSocket + */ +class BufferedSocketUnhookRequest : public ISHRequest { public: /** Initialize request as an unhook message */ - InspSocketUnhookRequest(InspSocket* is, Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_UNHOOK", is) + BufferedSocketUnhookRequest(BufferedSocket* is, Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_UNHOOK", is) { } }; -class InspSocketNameRequest : public ISHRequest +class BufferedSocketNameRequest : public ISHRequest { public: /** Initialize request as a get name message */ - InspSocketNameRequest(Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_NAME", NULL) + BufferedSocketNameRequest(Module* Me, Module* Target) : ISHRequest(Me, Target, "IS_NAME", NULL) { } }; #endif -