Commit 3f373aabedddf6c16c9e402c036d096dc99a42eb
1 parent
f7296885
Use new class interface and update copyright information
Showing
24 changed files
with
44 additions
and
33 deletions
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | * \author Georg Hopp |
7 | 7 | * |
8 | 8 | * \copyright |
9 | - * Copyright © 2012 Georg Hopp | |
9 | + * Copyright © 2014 Georg Hopp | |
10 | 10 | * |
11 | 11 | * This program is free software: you can redistribute it and/or modify |
12 | 12 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | * \author Georg Hopp |
6 | 6 | * |
7 | 7 | * \copyright |
8 | - * Copyright © 2012 Georg Hopp | |
8 | + * Copyright © 2014 Georg Hopp | |
9 | 9 | * |
10 | 10 | * This program is free software: you can redistribute it and/or modify |
11 | 11 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | * \author Georg Hopp |
7 | 7 | * |
8 | 8 | * \copyright |
9 | - * Copyright © 2012 Georg Hopp | |
9 | + * Copyright © 2014 Georg Hopp | |
10 | 10 | * |
11 | 11 | * This program is free software: you can redistribute it and/or modify |
12 | 12 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | * \author Georg Hopp |
7 | 7 | * |
8 | 8 | * \copyright |
9 | - * Copyright © 2012 Georg Hopp | |
9 | + * Copyright © 2014 Georg Hopp | |
10 | 10 | * |
11 | 11 | * This program is free software: you can redistribute it and/or modify |
12 | 12 | * it under the terms of the GNU General Public License as published by |
... | ... | @@ -37,8 +37,8 @@ TR_CLASS(TR_RemoteData) { |
37 | 37 | size_t ndata; |
38 | 38 | TR_Socket socket; |
39 | 39 | }; |
40 | - | |
41 | 40 | TR_INSTANCE_INIT(TR_RemoteData); |
41 | +TR_CLASSVARS_DECL(TR_RemoteData) {}; | |
42 | 42 | |
43 | 43 | extern TR_RemoteData TR_emptyRemoteData; |
44 | 44 | ... | ... |
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | * \author Georg Hopp |
8 | 8 | * |
9 | 9 | * \copyright |
10 | - * Copyright © 2012 Georg Hopp | |
10 | + * Copyright © 2014 Georg Hopp | |
11 | 11 | * |
12 | 12 | * This program is free software: you can redistribute it and/or modify |
13 | 13 | * it under the terms of the GNU General Public License as published by |
... | ... | @@ -64,8 +64,8 @@ TR_CLASS(TR_Socket) { |
64 | 64 | int handle; |
65 | 65 | TR_SocketFin fin_state; |
66 | 66 | }; |
67 | - | |
68 | 67 | TR_INSTANCE_INIT(TR_Socket); |
68 | +TR_CLASSVARS_DECL(TR_Socket) {}; | |
69 | 69 | |
70 | 70 | #define TR_socketLog(socket) (((TR_Socket)(socket))->log) |
71 | 71 | #define TR_socketFlags(socket) (((TR_Socket)(socket))->flags) |
... | ... | @@ -115,14 +115,14 @@ TR_CLASS(TR_TcpSocket) { |
115 | 115 | int listen; |
116 | 116 | int connected; |
117 | 117 | }; |
118 | - | |
119 | 118 | TR_INSTANCE_INIT(TR_TcpSocket); |
119 | +TR_CLASSVARS_DECL(TR_TcpSocket) {}; | |
120 | 120 | |
121 | 121 | TR_CLASS(TR_UdpSocket) { |
122 | 122 | TR_EXTENDS(TR_Socket); |
123 | 123 | }; |
124 | - | |
125 | 124 | TR_INSTANCE_INIT(TR_UdpSocket); |
125 | +TR_CLASSVARS_DECL(TR_UdpSocket) {}; | |
126 | 126 | |
127 | 127 | typedef int (* TR_socketAction_fptr)(void *); |
128 | 128 | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by |
... | ... | @@ -41,6 +41,7 @@ TR_CLASS(TR_Stream) { |
41 | 41 | } handle; |
42 | 42 | }; |
43 | 43 | TR_INSTANCE_INIT(TR_Stream); |
44 | +TR_CLASSVARS_DECL(TR_Stream) {}; | |
44 | 45 | |
45 | 46 | ssize_t TR_streamRead(TR_Stream, void *, size_t); |
46 | 47 | ssize_t TR_streamWrite(TR_Stream, void *, size_t); | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by |
... | ... | @@ -58,7 +58,7 @@ remoteDataDtor(void * _this) |
58 | 58 | } |
59 | 59 | |
60 | 60 | TR_INIT_IFACE(TR_Class, remoteDataCtor, remoteDataDtor, NULL); |
61 | -TR_CREATE_CLASS(TR_RemoteData, NULL, TR_IF(TR_Class)); | |
61 | +TR_CREATE_CLASS(TR_RemoteData, NULL, NULL, TR_IF(TR_Class)); | |
62 | 62 | |
63 | 63 | TR_INSTANCE(TR_RemoteData, TR_emptyRemoteData, NULL, 0, NULL, NULL); |
64 | 64 | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by |
... | ... | @@ -89,6 +89,6 @@ socketBind(void * _this) |
89 | 89 | |
90 | 90 | TR_INIT_IFACE(TR_Class, socketCtor, socketDtor, NULL); |
91 | 91 | TR_INIT_IFACE(TR_Socket, socketBind, NULL, NULL); |
92 | -TR_CREATE_CLASS(TR_Socket, NULL, TR_IF(TR_Class), TR_IF(TR_Socket)); | |
92 | +TR_CREATE_CLASS(TR_Socket, NULL, NULL, TR_IF(TR_Class), TR_IF(TR_Socket)); | |
93 | 93 | |
94 | 94 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by |
... | ... | @@ -53,6 +53,6 @@ streamCtor(void * _this, va_list * params) |
53 | 53 | static void streamDtor(void * _this) {} |
54 | 54 | |
55 | 55 | TR_INIT_IFACE(TR_Class, streamCtor, streamDtor, NULL); |
56 | -TR_CREATE_CLASS(TR_Stream, NULL, TR_IF(TR_Class)); | |
56 | +TR_CREATE_CLASS(TR_Stream, NULL, NULL, TR_IF(TR_Class)); | |
57 | 57 | |
58 | 58 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by |
... | ... | @@ -117,6 +117,11 @@ TR_INIT_IFACE( |
117 | 117 | tcpSocketConnect, |
118 | 118 | tcpSocketRecv, |
119 | 119 | tcpSocketSend); |
120 | -TR_CREATE_CLASS(TR_TcpSocket, TR_Socket, TR_IF(TR_Class), TR_IF(TR_Socket)); | |
120 | +TR_CREATE_CLASS( | |
121 | + TR_TcpSocket, | |
122 | + TR_Socket, | |
123 | + NULL, | |
124 | + TR_IF(TR_Class), | |
125 | + TR_IF(TR_Socket)); | |
121 | 126 | |
122 | 127 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by |
... | ... | @@ -98,6 +98,11 @@ udpSocketSend(TR_Socket this, TR_RemoteData data) |
98 | 98 | |
99 | 99 | TR_INIT_IFACE(TR_Class, udpSocketCtor, NULL, NULL); |
100 | 100 | TR_INIT_IFACE(TR_Socket, NULL, NULL, udpSocketRecv, udpSocketSend); |
101 | -TR_CREATE_CLASS(TR_UdpSocket, TR_Socket, TR_IF(TR_Class), TR_IF(TR_Socket)); | |
101 | +TR_CREATE_CLASS( | |
102 | + TR_UdpSocket, | |
103 | + TR_Socket, | |
104 | + NULL, | |
105 | + TR_IF(TR_Class), | |
106 | + TR_IF(TR_Socket)); | |
102 | 107 | |
103 | 108 | // vim: set ts=4 sw=4: | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2014 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
Please
register
or
login
to post a comment