ObjFW  Diff

Differences From Artifact [6a455c4113]:

To Artifact [d9acc0eea7]:


16
17
18
19
20
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#import "OFDatagramSocket.h"

OF_ASSUME_NONNULL_BEGIN

@class OFString;
@class OFDictionary OF_GENERIC(KeyType, ObjectType);

#ifdef OF_HAVE_APPLETALK_IFCONFIG
/**
 * @brief A dictionary mapping keys of type @ref
 *	  OFAppleTalkInterfaceConfigurationKey.
 */
typedef OFConstantString *OFAppleTalkInterfaceConfigurationKey;

/**
 * @brief A key for OFAppleTalkInterfaceConfiguration.
 *
 * Possible keys are:
 *  * @ref OFAppleTalkInterfaceConfigurationNetwork
 *  * @ref OFAppleTalkInterfaceConfigurationNode
 *  * @ref OFAppleTalkInterfaceConfigurationPhase
 *  * @ref OFAppleTalkInterfaceConfigurationNetworkRange
 */
typedef OFDictionary OF_GENERIC(OFAppleTalkInterfaceConfigurationKey, id)
    *OFAppleTalkInterfaceConfiguration;

/**
 * @brief The AppleTalk network of an interface.
 *
 * The corresponding value is of type @ref OFNumber in the range 0 to 65535.
 */
extern const OFAppleTalkInterfaceConfigurationKey
    OFAppleTalkInterfaceConfigurationNetwork;

/**
 * @brief The AppleTalk node of an interface.
 *
 * The corresponding value is of type @ref OFNumber in the range 0 to 255.
 */
extern const OFAppleTalkInterfaceConfigurationKey
    OFAppleTalkInterfaceConfigurationNode;

/**
 * @brief The AppleTalk phase of an interface.
 *
 * The corresponding value is of type @ref OFNumber in the range 1 to 2.
 */
extern const OFAppleTalkInterfaceConfigurationKey
    OFAppleTalkInterfaceConfigurationPhase;

/**
 * @brief The AppleTalk network range of an interface.
 *
 * The corresponding value is of type @ref OFPair with two @ref OFNumber, both
 * in the range 0 to 65535.
 */
extern const OFAppleTalkInterfaceConfigurationKey
    OFAppleTalkInterfaceConfigurationNetworkRange;
#endif

/**
 * @protocol OFDDPSocketDelegate OFDDPSocket.h ObjFW/OFDDPSocket.h
 *
 * @brief A delegate for OFDDPSocket.
 */
@protocol OFDDPSocketDelegate <OFDatagramSocketDelegate>
@end







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







16
17
18
19
20
21
22





















































23
24
25
26
27
28
29
#import "OFDatagramSocket.h"

OF_ASSUME_NONNULL_BEGIN

@class OFString;
@class OFDictionary OF_GENERIC(KeyType, ObjectType);






















































/**
 * @protocol OFDDPSocketDelegate OFDDPSocket.h ObjFW/OFDDPSocket.h
 *
 * @brief A delegate for OFDDPSocket.
 */
@protocol OFDDPSocketDelegate <OFDatagramSocketDelegate>
@end
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
 *
 * @note The delegate is retained for as long as asynchronous operations are
 *	 still ongoing.
 */
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
    id <OFDDPSocketDelegate> delegate;

#ifdef OF_HAVE_APPLETALK_IFCONFIG
/**
 * @brief Configures the specified interface with the specified AppleTalk
 *	  configuration.
 *
 * @param configuration The AppleTalk configuration for the interface. See
 *			@ref OFAppleTalkInterfaceConfiguration for more
 *			details.
 * @param interfaceName The name of the interface to configure for AppleTalk
 * @throw OFSetOptionFailedException Setting the configuration failed. Consult
 *				     errNo for details.
 */
+ (void)setConfiguration: (OFAppleTalkInterfaceConfiguration)configuration
	    forInterface: (OFString *)interfaceName;

/**
 * @brief Returns the AppleTalk configuration for the specified interface.
 *
 * @param interfaceName The name of the interface for which to return the
 *			AppleTalk configuration
 * @return The AppleTalk configuration for the specified interface, or `nil` if
 *	   the specified interface is not configured for AppleTalk. See
 *	   @ref OFAppleTalkInterfaceConfiguration for more details.
 * @throw OFGetOptionFailedException Getting the configuration failed. Consult
 *				     errNo for details.
 */
+ (nullable OFAppleTalkInterfaceConfiguration)
    configurationForInterface: (OFString *)interfaceName;

/**
 * @brief Removes the AppleTalk configuration for the specified interface.
 *
 * @param interfaceName The name of the interface for which to remove the
 *			AppleTalk configuration
 * @throw OFSetOptionFailedException Removing the configuration failed. Consult
 *				     errNo for details.
 */
+ (void)removeConfigurationForInterface: (OFString *)interfaceName;
#endif

/**
 * @brief Bind the socket to the specified network, node and port.
 *
 * @param network The network to bind to. 0 means any.
 * @param node The node to bind to. 0 means "this node".
 * @param port The port to bind to. 0 means to pick one and return it via the
 *	       returned socket address.







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







66
67
68
69
70
71
72








































73
74
75
76
77
78
79
 *
 * @note The delegate is retained for as long as asynchronous operations are
 *	 still ongoing.
 */
@property OF_NULLABLE_PROPERTY (assign, nonatomic)
    id <OFDDPSocketDelegate> delegate;









































/**
 * @brief Bind the socket to the specified network, node and port.
 *
 * @param network The network to bind to. 0 means any.
 * @param node The node to bind to. 0 means "this node".
 * @param port The port to bind to. 0 means to pick one and return it via the
 *	       returned socket address.