ObjFW  Diff

Differences From Artifact [31983ae5e4]:

To Artifact [943d945622]:


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@end

/**
 * \brief A class that can observe multiple streams at once.
 */
@interface OFStreamObserver: OFObject
{
	OFObject <OFStreamObserverDelegate> *delegate;
#ifdef OF_HAVE_POLL
	OFDataArray *fds;
#else
	fd_set readfds;
	fd_set writefds;
	int nfds;
#endif
	OFMutableDictionary *fdToStream;
}

#ifdef OF_HAVE_PROPERTIES
@property (retain) OFObject <OFStreamObserverDelegate> *delegate;
#endif

/**
 * \return A new, autoreleased OFStreamObserver
 */
+ streamObserver;

/**
 * \return The delegate for the OFStreamObserver
 */
- (OFObject <OFStreamObserverDelegate>*)delegate;

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

/**
 * Adds a stream to observe for reading.
 *
 * \param stream The stream to observe for reading
 */
- (void)addStreamToObserveForReading: (OFStream*)stream;







|











|










|






|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@end

/**
 * \brief A class that can observe multiple streams at once.
 */
@interface OFStreamObserver: OFObject
{
	id <OFStreamObserverDelegate> delegate;
#ifdef OF_HAVE_POLL
	OFDataArray *fds;
#else
	fd_set readfds;
	fd_set writefds;
	int nfds;
#endif
	OFMutableDictionary *fdToStream;
}

#ifdef OF_HAVE_PROPERTIES
@property (retain) id <OFStreamObserverDelegate> delegate;
#endif

/**
 * \return A new, autoreleased OFStreamObserver
 */
+ streamObserver;

/**
 * \return The delegate for the OFStreamObserver
 */
- (id <OFStreamObserverDelegate>)delegate;

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

/**
 * Adds a stream to observe for reading.
 *
 * \param stream The stream to observe for reading
 */
- (void)addStreamToObserveForReading: (OFStream*)stream;