Diffusion Apple API  6.1.5
Unified Client Library for iOS, tvOS and OS X / macOS
 All Classes Functions Variables Properties Pages
Properties | Instance Methods | List of all members
PTDiffusionContent Class Reference

Introduction

Content can represent the state of a topic.

It may also form the body of a message sent to or from a client. A content object is immutable.

Note
The use of this interface is being phased out in favor of specific data types. The only remaining places where it must be used is in implementations conforming to the older messaging delegate protocols PTDiffusionMessageDelegate and PTDiffusionMessageStreamDelegate, and in implementations conforming to the fetch delegate protocol PTDiffusionFetchStreamDelegate. In all other cases its use should be avoided.
Since
5.6
Inheritance diagram for PTDiffusionContent:
PTDiffusionBytes

Properties

PTDiffusionRecordContentrecordContent
 
- Properties inherited from PTDiffusionBytes
NSData * data
 

Instance Methods

(nullable
PTDiffusionRecordContent *) 
- recordContentWithSchema:error:
 
(BOOL) - isEqualToContent:
 
- Instance Methods inherited from PTDiffusionBytes
(instancetype) - initWithData:
 
(BOOL) - isEqualToBytes:
 

Method Documentation

- (BOOL) isEqualToContent: (nullable PTDiffusionContent *)  content

Compares the receiver to the given content.

Parameters
contentThe content object with which to compare the receiver.
Returns
YES if the data in content is equal to the contents of the receiver, otherwise NO.
Note
Two content objects are equal if they hold the same number of data bytes, and if the bytes at the same position in the objects are the same.
Since
5.6
- (nullable PTDiffusionRecordContent *) recordContentWithSchema: (PTDiffusionRecordContentSchema *)  schema
error: (NSError **)  error 

Returns the data interpreted as records and transformed using associated metadata drawn from the given schema.

This method will return nil if an error occurred.

Parameters
schemaA schema to be applied to the data as it's interpreted.
errorIf an error occurs, upon return contains an NSError object that describes the problem.
Deprecated:
Since 6.0.6. The PTDiffusionRecord class has been deprecated, to be replaced by either PTDiffusionRecordV2 or PTDiffusionJSON.
Since
5.6

Property Documentation

- (PTDiffusionRecordContent*) recordContent
readnonatomiccopy

The data interpreted as records.

Deprecated:
Since 6.0.6. The PTDiffusionRecord class has been deprecated, to be replaced by either PTDiffusionRecordV2 or PTDiffusionJSON.
Since
5.6