ObjFW  Check-in [0769e074eb]

Overview
Comment:Documentation improvements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0769e074eb359917caa1126c14a9ab0e0392157cf5ca3392abdcbac8e92180c2
User & Date: js on 2010-11-24 19:45:10
Other Links: manifest | tags
Context
2010-11-25
21:00
Implement -[description] for OFList. check-in: 92ca1cd5ba user: js tags: trunk
2010-11-24
19:45
Documentation improvements. check-in: 0769e074eb user: js tags: trunk
2010-11-21
20:30
OFXMLParser: Correctly handle spaces in attributes. check-in: aba290270b user: js tags: trunk
Changes

Modified src/OFStreamObserver.h from [1bd2857348] to [3a3ac21b99].

56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70







-
+







 */
- (void)streamDidReceiveException: (OFStream*)stream;
@end

/**
 * \brief A class that can observe multiple streams at once.
 *
 * Note: Currently, it can only observe sockets on Win32.
 * Note: Currently, Win32 can only observe sockets and not files!
 */
@interface OFStreamObserver: OFObject
{
	OFMutableArray *readStreams;
	OFMutableArray *writeStreams;
	id <OFStreamObserverDelegate> delegate;
#ifdef OF_HAVE_POLL
98
99
100
101
102
103
104


105
106
107
108
109
110


111
112
113
114
115
116
117
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121







+
+






+
+







 * \param delegate The delegate for the OFStreamObserver
 */
- (void)setDelegate: (id <OFStreamObserverDelegate>)delegate;

/**
 * Adds a stream to observe for reading.
 *
 * It is recommended that the stream you add it set to non-blocking mode.
 *
 * \param stream The stream to observe for reading
 */
- (void)addStreamToObserveForReading: (OFStream*)stream;

/**
 * Adds a stream to observe for writing.
 *
 * It is recommended that the stream you add it set to non-blocking mode.
 *
 * \param stream The stream to observe for writing
 */
- (void)addStreamToObserveForWriting: (OFStream*)stream;

/**
 * Removes a stream to observe for reading.

Modified src/OFTCPSocket.h from [b07d89367b] to [64acad46b9].

21
22
23
24
25
26
27



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48


49
50
51
52
53
54
55
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

51
52
53
54
55
56
57
58
59







+
+
+




















-
+
+







# include <ws2tcpip.h>
#endif

@class OFString;

/**
 * \brief A class which provides functions to create and use TCP sockets.
 *
 * To connect to a server, create a socket and connect it.
 * To create a server, create a socket, bind it and listen on it.
 */
@interface OFTCPSocket: OFStreamSocket
{
	struct sockaddr	*sockAddr;
	socklen_t	sockAddrLen;
}

/**
 * Connect the OFTCPSocket to the specified destination.
 *
 * \param service The service on the node to connect to
 * \param node The node to connect to
 */
- (void)connectToService: (OFString*)service
		  onNode: (OFString*)node;

/**
 * Bind socket on the specified node and service.
 *
 * \param service The service to bind
 * \param node The node to bind to
 * \param node The node to bind to. Use @"0.0.0.0" for IPv4 or @"::" for IPv6
 *	       to bind to all.
 * \param family The family to use (AF_INET for IPv4 or AF_INET6 for IPv6)
 */
- (void)bindService: (OFString*)service
	     onNode: (OFString*)node
	 withFamily: (int)family;

/**

Modified tests/OFXMLParserTests.m from [681a60ffe3] to [f82b21bdca].

317
318
319
320
321
322
323
324

325
326

327
328
329
330
331
332
333
317
318
319
320
321
322
323

324
325

326
327
328
329
330
331
332
333







-
+

-
+







	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFXMLParser *parser;
	const char *str = "<?xml version='1.0'?><?p?i?>"
	    "<!DOCTYPE <<><<>>>><root>\n"
	    " <![CDATA[f<]]]oo]]><bar/>\n"
	    " <foobar xmlns='urn:objfw:test:foobar'>\n"
	    "  <qux xmlns:foo='urn:objfw:test:foo'>\n"
	    "   <foo:bla foo:bla='&#x62;&#x6c;&#x61;' blafoo='foo'>\n"
	    "   <foo:bla foo:bla = '&#x62;&#x6c;&#x61;' blafoo='foo'>\n"
	    "    <blup foo:qux='asd' quxqux='test'/>\n"
	    "    <bla:bla\r\rxmlns:bla=\"urn:objfw:test:bla\" qux='qux'\r\n"
	    "    <bla:bla\r\rxmlns:bla\r=\t\"urn:objfw:test:bla\" qux='qux'\r\n"
	    "     bla:foo='blafoo'/>\n"
	    "    <abc xmlns='urn:objfw:test:abc' abc='abc' foo:abc='abc'/>\n"
	    "   </foo:bla>\n"
	    "   <!-- commänt -->\n"
	    "  </qux>\n"
	    " </foobar>\n"
	    "</root>";