NSHTTPCookie: make -isSessionOnly and -isSecure properties

Make -[NSHTTPCookie isSessionOnly] and -[NSHTTPCookie isSecure] methods
become properties if possible, so that they can be also queried as
`cookie.sessionOnly` and `cookie.secure`. This increases compatibility
with applications that rely on this notation.
This commit is contained in:
Daniel Ferreira 2017-06-21 09:41:52 +10:00 committed by Ivan Vučica
parent 3111003ca1
commit fae4ff3371

View file

@ -204,13 +204,21 @@ extern NSString * const NSHTTPCookieVersion; /** Obtain cookie version */
* Returns whether the receiver should only be sent over
* secure connections.
*/
#if GS_HAS_DECLARED_PROPERTIES
@property (readonly, getter=isSecure) BOOL secure;
#else
- (BOOL) isSecure;
#endif
/**
* Returns whether the receiver should be destroyed at the end of the
* session.
*/
#if GS_HAS_DECLARED_PROPERTIES
@property (readonly, getter=isSessionOnly) BOOL sessionOnly;
#else
- (BOOL) isSessionOnly;
#endif
/**
* Returns the name of the receiver.