WSCFrame Class Reference
Inherits from | NSObject |
---|---|
Declared in | WSCFrame.h |
headers
Object representation for header block of frame.
@property (readonly) WSCHeaders *headers
Discussion
Object representation for header block of frame.
Declared In
WSCFrame.h
control
Object representation for control block of frame.
@property (readonly) WSCControl *control
Discussion
Object representation for control block of frame.
Declared In
WSCFrame.h
payload
Object representation for payload block of frame.
@property (readonly) WSCPayload *payload
Discussion
Object representation for payload block of frame.
Declared In
WSCFrame.h
– init
Constructor with empty JSON data.
- (instancetype)init
Discussion
Constructor with empty JSON data.
Declared In
WSCFrame.h
– initWithJson:
Constructor with a given JSON string.
- (instancetype)initWithJson:(NSString *)json
Parameters
json |
JSON data |
---|
Discussion
Constructor with a given JSON string.
Declared In
WSCFrame.h
– description
Converts to a JSON string.
- (NSString *)description
Return Value
JSON string
Discussion
Converts to a JSON string.
Declared In
WSCFrame.h
– getJsonDictionary
Converts to a dictionary.
- (NSDictionary *)getJsonDictionary
Return Value
Dictionary representation of frame.
Discussion
Converts to a dictionary.
Declared In
WSCFrame.h
– get:param:
Gets a JSON element.
- (id)get:(NSString *)key param:(NSString *)param
Parameters
key |
Key (such as “control”, “header”, “payload”) |
---|---|
param |
Parameter name (for example, “initiator”) |
Return Value
the value or null
Discussion
Gets a JSON element.
Declared In
WSCFrame.h
– getString:param:
Gets a JSON string.
- (NSString *)getString:(NSString *)key param:(NSString *)param
Parameters
key |
Key (such as “control”, “header”, “payload”) |
---|---|
param |
Parameter name (for example, “initiator”) |
Return Value
String value or null
Discussion
Gets a JSON string.
Declared In
WSCFrame.h
– getInt:param:
Gets a JSON int.
- (NSInteger)getInt:(NSString *)key param:(NSString *)param
Parameters
key |
Key (such as “control”, “header”, “payload”) |
---|---|
param |
Parameter name (for example, “initiator”) |
Return Value
String value or null
Discussion
Gets a JSON int.
Declared In
WSCFrame.h
– set:param:value:
Sets a JSON element.
- (void)set:(NSString *)key param:(NSString *)param value:(NSObject *)value
Parameters
key |
Key (such as “control”, “header”, “payload”) |
---|---|
param |
Parameter name (for example, “initiator”) |
value |
Value to set |
Discussion
Sets a JSON element.
Declared In
WSCFrame.h
– addKey:
Adds an empty JSON element.
- (void)addKey:(NSString *)key
Parameters
key |
Key (such as “control”, “header”, “payload”) |
---|
Discussion
Adds an empty JSON element.
Declared In
WSCFrame.h
– setString:param:value:
Sets a string parameter.
- (void)setString:(NSString *)key param:(NSString *)param value:(NSString *)value
Parameters
key |
Key (such as “control”, “header”, “payload”) |
---|---|
param |
Parameter name (for example, “initiator”) |
value |
Value to set |
Discussion
Sets a string parameter.
Declared In
WSCFrame.h
– setInt:param:value:
Sets a integer parameter.
- (void)setInt:(NSString *)key param:(NSString *)param value:(NSInteger)value
Parameters
key |
Key (such as “control”, “header”, “payload”) |
---|---|
param |
Parameter name (for example, “initiator”) |
value |
Value to set |
Discussion
Sets a integer parameter.
Declared In
WSCFrame.h