DEPRECATED: Diffusion iOS Classic API  5.9.4
 All Data Structures Files Functions Variables Enumerations Enumerator Properties Macros Pages
DFServiceTopicHandler.h
1 //
2 // DFServiceTopicHandler.h
3 // DiffusionTransport
4 //
5 // Created by Martin Cowie on 23/12/2011 - Diffusion 5.9.4_01
6 // Copyright (c) 2013 Push Technology Ltd. All rights reserved
7 //
8 
9 #import "DFTopicListenerDelegate.h"
10 #import "DFServiceTopicDelegate.h"
11 
12 @class DFClient, DFTopicMessage;
13 
14 /**
15  The class for making and handling service calls to topics with service topicdata.
16  */
18 
19 @property(nonatomic, readonly) NSString *serviceType; /**< The symbolic 'service' type' string returned from the service upon subscription */
20 @property(nonatomic, readonly) NSString *topicCategory;
21 @property(weak, nonatomic, readonly,getter = getTopic) NSString *topic; /**< Topic to which this service is bound */
22 @property(nonatomic, readonly) DFTopicMessage *serviceData; /**< Returns a message containing any fixed data returned upon subscription */
23 @property(weak, nonatomic, readonly) DFClient *client; /**< Returns the client connection */
24 
25 
26 /**
27  * Sends a request to the Service.
28  * <P>
29  * If the request succeeds then a response will be returned on
30  * [DFServiceTopicDelegate serviceResponse:] and
31  * if it fails or is timed out at the server then an error will be returned
32  * on [DFServiceTopicDelegate serviceError:].
33  *
34  * @param type The request type. This must be one of the allowed types for the service.
35  *
36  * @param message Optional request data. If supplied then the headers and data from the given Message will be sent with the request.
37  *
38  * @return unique request identifier
39  */
40 -(NSString*)sendRequest:(DFTopicMessage*)message withRequestType:(NSString*)type;
41 
42 
43 /**
44  * Sends a request to the Service.
45  * <P>
46  * If the request succeeds then a response will be returned on
47  * [DFServiceTopicDelegate serviceResponse:] and
48  * if it fails or is timed out at the server then an error will be returned
49  * on [DFServiceTopicDelegate serviceError:].
50  *
51  * @param type The request type. This must be one of the allowed types for the service.
52  *
53  * @param message Optional request data. If supplied then the headers and data from the given Message will be sent with the request.
54  *
55  * @param uid request identifier. Use the method 'getRequestUID' for the next suitable UID. UIDs need only be unique in this session.
56  *
57  * @return the value of argument 'uid'
58  */
59 -(NSString*)sendRequest:(DFTopicMessage*)message withRequestType:(NSString*)type andUID:(NSString*)uid;
60 
61 /**
62  * Get the next unique request ID for use with sendRequest:withRequestType:andUID:
63  */
64 -(NSString*)getNextRequestID;
65 
66 
67 @end