ObjFW  Diff

Differences From Artifact [d7ddb6bfe4]:

To Artifact [c58919a56b]:


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
17
18
19
20
21
22
23



























24
25
26
27
28
29
30







-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-







#import "OFString.h"

OF_ASSUME_NONNULL_BEGIN

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

#ifdef OF_SYSTEM_INFO_HAS_NETWORK_INTERFACES
/**
 * @brief A key in the per-interface dictionary returned by
 *	  @ref networkInterfaces.
 *
 * Possible keys are:
 *
 *   * @ref OFNetworkInterfaceAddresses
 *   * @ref OFNetworkInterfaceEthernetAddress
 */
typedef OFConstantString *OFNetworkInterfaceInfoKey;

/**
 * @brief The addresses of a network interface.
 *
 * This maps to an @ref OFData of @ref OFSocketAddress.
 */
extern OFConstantString *const OFNetworkInterfaceAddresses;

/**
 * @brief The Ethernet address of a network interface.
 *
 * This maps to an @ref OFData.
 */
extern OFConstantString *const OFNetworkInterfaceEthernetAddress;
#endif

/**
 * @class OFSystemInfo OFSystemInfo.h ObjFW/OFSystemInfo.h
 *
 * @brief A class for querying information about the system.
 */
OF_SUBCLASSING_RESTRICTED
@interface OFSystemInfo: OFObject
86
87
88
89
90
91
92
93
94


95
96

97
98
99
100
101
102
103
59
60
61
62
63
64
65


66
67


68
69
70
71
72
73
74
75







-
-
+
+
-
-
+







# endif
# if defined(OF_POWERPC) || defined(OF_POWERPC64) || defined(DOXYGEN)
@property (class, readonly, nonatomic) bool supportsAltiVec;
# endif
# ifdef OF_WINDOWS
@property (class, readonly, nonatomic, getter=isWindowsNT) bool windowsNT;
# endif
# ifdef OF_SYSTEM_INFO_HAS_NETWORK_INTERFACES
@property (class, readonly, nonatomic) OFDictionary OF_GENERIC(OFString *,
# ifdef OF_HAVE_SOCKETS
@property (class, readonly, nullable, nonatomic)
    OFDictionary OF_GENERIC(OFNetworkInterfaceInfoKey, id) *)
    *networkInterfaces;
    OFArray OF_GENERIC(OFString *) *networkInterfaces;
# endif
#endif

/**
 * @brief Returns the size of a page.
 *
 * @return The size of a page
367
368
369
370
371
372
373
374

375
376
377

378
379

380
381

382
383
384
385
386
387
388
389
339
340
341
342
343
344
345

346
347
348

349
350

351
352

353

354
355
356
357
358
359
360







-
+


-
+

-
+

-
+
-







 * @note This method is only available on Windows.
 *
 * @return Whether the application is running on Windows NT
 */
+ (bool)isWindowsNT;
#endif

#ifdef OF_SYSTEM_INFO_HAS_NETWORK_INTERFACES
#ifdef OF_HAVE_SOCKETS
/**
 * @brief Returns the available (though not necessarily configured) network
 *	  interfaces and information about them.
 *	  interfaces.
 *
 * @return The available network interfaces and information about them
 * @return The available network interfaces
 */
+ (OFDictionary OF_GENERIC(OFString *, OFDictionary
+ (nullable OFArray OF_GENERIC(OFString *) *)networkInterfaces;
    OF_GENERIC(OFNetworkInterfaceInfoKey, id) *) *)networkInterfaces;
#endif

+ (instancetype)alloc OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
@end

OF_ASSUME_NONNULL_END