added IRC Client and RAW pass-through
[TransparentIRC.git] / src / IOHandler.h
index 7d33ce23f9ee070b37be8129e8e0acd5863290bc..3e9e7053981ed8d045cfb459926c285a383bce73 100644 (file)
@@ -57,6 +57,7 @@ struct IOBuffer {
 
 struct IODescriptor {
     int fd;
+    FILE *file;
     enum IOType type;
     enum IOStatus state;
     struct timeval timeout;
@@ -65,6 +66,7 @@ struct IODescriptor {
     struct IOBuffer writebuf;
     void *data;
     int read_lines : 1;
+    int ssl : 1;
     
     struct IODescriptor *next, *prev;
 };
@@ -80,9 +82,10 @@ struct IOEvent {
 };
 
 struct IODescriptor *iohandler_add(int sockfd, enum IOType type, iohandler_callback *callback);
+struct IODescriptor *iohandler_file(FILE *file, iohandler_callback *callback);
 struct IODescriptor *iohandler_timer(struct timeval timeout, iohandler_callback *callback);
-struct IODescriptor *iohandler_connect(const char *hostname, unsigned int port, const char *bind, iohandler_callback *callback);
-struct IODescriptor *iohandler_listen(const char *hostname, unsigned int port, iohandler_callback *callback);
+struct IODescriptor *iohandler_connect(const char *hostname, unsigned int port, int ssl, const char *bind, iohandler_callback *callback);
+struct IODescriptor *iohandler_listen(const char *hostname, unsigned int port, int ssl, iohandler_callback *callback);
 void iohandler_write(struct IODescriptor *iofd, const char *line);
 void iohandler_send(struct IODescriptor *iofd, const char *data, size_t datalen);
 void iohandler_printf(struct IODescriptor *iofd, const char *text, ...);