ObjFW  Diff

Differences From Artifact [4d41b6f478]:

  • File src/OFHTTPCookie.h — part of check-in [0a73af49f0] at 2017-04-30 13:35:16 on branch trunk — Use nonatomic for properties and clean up

    This changes retaining behavior, meaning properties are not returned
    retained and autoreleased anymore, so a property returned from a getter
    now needs to be manually retained and autoreleased before calling the
    setter. However, this is rarely the case and not using atomic improves
    performance. (user: js, size: 2555) [annotate] [blame] [check-ins using]

To Artifact [f54859d1ab]:


26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 */
@interface OFHTTPCookie: OFObject <OFCopying>
{
	OFString *_name, *_value;
	OFDate *_expires;
	OFString *_domain, *_path;
	bool _secure, _HTTPOnly;
	OFMutableArray OF_GENERIC(OFString*) *_extensions;
}

/*!
 * The name of the cookie.
 */
@property (nonatomic, copy) OFString *name;








|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 */
@interface OFHTTPCookie: OFObject <OFCopying>
{
	OFString *_name, *_value;
	OFDate *_expires;
	OFString *_domain, *_path;
	bool _secure, _HTTPOnly;
	OFMutableArray OF_GENERIC(OFString *) *_extensions;
}

/*!
 * The name of the cookie.
 */
@property (nonatomic, copy) OFString *name;

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
95
96
97
98
99
100
101
102
103
104
105
 */
@property (getter=isHTTPOnly) bool HTTPOnly;

/*!
 * An array of other attributes.
 */
@property (readonly, nonatomic)
    OFMutableArray OF_GENERIC(OFString*) *extensions;

/*!
 * @brief Create a new cookie with the specified name and value.
 *
 * @param name The name of the cookie
 * @param value The value of the cookie
 * @return A new, autoreleased OFHTTPCookie
 */
+ (instancetype)cookieWithName: (OFString*)name
			 value: (OFString*)value;

/*!
 * @brief Parses the specified string and returns an array of cookies.
 *
 * @param string The cookie string to parse
 * @return An array of cookies
 */
+ (OFArray OF_GENERIC(OFHTTPCookie*)*)cookiesForString: (OFString*)string;

/*!
 * @brief Initializes an already allocated new cookie with the specified name
 *	  and value.
 *
 * @param name The name of the cookie
 * @param value The value of the cookie
 * @return An initialized OFHTTPCookie
 */
- initWithName: (OFString*)name
	 value: (OFString*)value;
@end







|








|
|







|









|
|

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
95
96
97
98
99
100
101
102
103
104
105
 */
@property (getter=isHTTPOnly) bool HTTPOnly;

/*!
 * An array of other attributes.
 */
@property (readonly, nonatomic)
    OFMutableArray OF_GENERIC(OFString *) *extensions;

/*!
 * @brief Create a new cookie with the specified name and value.
 *
 * @param name The name of the cookie
 * @param value The value of the cookie
 * @return A new, autoreleased OFHTTPCookie
 */
+ (instancetype)cookieWithName: (OFString *)name
			 value: (OFString *)value;

/*!
 * @brief Parses the specified string and returns an array of cookies.
 *
 * @param string The cookie string to parse
 * @return An array of cookies
 */
+ (OFArray OF_GENERIC(OFHTTPCookie *) *)cookiesForString: (OFString *)string;

/*!
 * @brief Initializes an already allocated new cookie with the specified name
 *	  and value.
 *
 * @param name The name of the cookie
 * @param value The value of the cookie
 * @return An initialized OFHTTPCookie
 */
- initWithName: (OFString *)name
	 value: (OFString *)value;
@end