|
1 /** @file |
|
2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Declares the RUpnpGenaMessageFactory class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_RUPNPGENAMESSAGEFACTORY_H |
|
20 #define C_RUPNPGENAMESSAGEFACTORY_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <e32base.h> |
|
25 #include "upnpgenamessage.h" |
|
26 |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * @brief Gena Message Factory. |
|
31 * |
|
32 * Used to create standard GENA-messages. |
|
33 * |
|
34 * @since Series60 2.6 |
|
35 */ |
|
36 class RUpnpGenaMessageFactory |
|
37 { |
|
38 public: // New functions |
|
39 |
|
40 /** |
|
41 * Constructor function; Creates subscription message with following |
|
42 * parameters. |
|
43 * @since Series60 2.6 |
|
44 * @param aPath Publisher path. |
|
45 * @param aHost Publisher host and port. |
|
46 * @param aCallback Callback address. |
|
47 */ |
|
48 IMPORT_C static CUpnpGenaMessage* SubscribeL( const TDesC8& aPath, |
|
49 TInetAddr& aHost, |
|
50 const TDesC8& aCallback ); |
|
51 |
|
52 /** |
|
53 * Constructor function; Creates subscription message with following |
|
54 * parameters. |
|
55 * @since Series60 2.6 |
|
56 * @param aPath Publisher path. |
|
57 * @param aHost Publisher host and port. |
|
58 * @param aCallback Callback address. |
|
59 * @param aTimeout Requested subscription timeout. |
|
60 */ |
|
61 IMPORT_C static CUpnpGenaMessage* SubscribeL( const TDesC8& aPath, |
|
62 TInetAddr& aHost, |
|
63 const TDesC8& aCallback, |
|
64 const TDesC8& aTimeout ); |
|
65 |
|
66 /** |
|
67 * Constructor function; Creates resubscription message with following |
|
68 * parameters. |
|
69 * @since Series60 2.6 |
|
70 * @param aPath Publisher path. |
|
71 * @param aHost Publisher host and port. |
|
72 * @param aSid Subscription id. |
|
73 */ |
|
74 IMPORT_C static CUpnpGenaMessage* ResubscribeL( const TDesC8& aPath, |
|
75 TInetAddr& aHost, |
|
76 const TDesC8& aSid ); |
|
77 |
|
78 /** |
|
79 * Constructor function; Creates resubscription message with following |
|
80 * parameters. |
|
81 * @since Series60 2.6 |
|
82 * @param aPath Publisher path. |
|
83 * @param aHost Publisher host and port. |
|
84 * @param aSid Subscription id. |
|
85 * @param aTimeout Requested subscription timeout. |
|
86 */ |
|
87 IMPORT_C static CUpnpGenaMessage* ResubscribeL( const TDesC8& aPath, |
|
88 TInetAddr& aHost, |
|
89 const TDesC8& aSid, |
|
90 const TDesC8& aTimeout ); |
|
91 |
|
92 /** |
|
93 * Constructor function; Creates unsubscription message with following |
|
94 * parameters. |
|
95 * @since Series60 2.6 |
|
96 * @param aPath Publisher path. |
|
97 * @param aHost Publisher host and port. |
|
98 * @param aSid Subscription id. |
|
99 */ |
|
100 IMPORT_C static CUpnpGenaMessage* UnsubscribeL( const TDesC8& aPath, |
|
101 TInetAddr& aHost, |
|
102 const TDesC8& aSid ); |
|
103 |
|
104 /** |
|
105 * Constructor function; Creates subscription response message with |
|
106 * following parameters. |
|
107 * @since Series60 2.6 |
|
108 * @param aSessionId Sennion id to respond. |
|
109 * @param aDestination Destination address. |
|
110 * @param aSid Subscription id. |
|
111 * @param aTimeout Timeout defined by the Service. Integer or Infinite. |
|
112 * @return Response which is ready to send. |
|
113 */ |
|
114 IMPORT_C static CUpnpGenaMessage* SubscribeResponseL( TInt aSessionId, |
|
115 const TInetAddr& aDestination, |
|
116 const TDesC8& aSid, |
|
117 const TDesC8& aTimeout ); |
|
118 |
|
119 /** |
|
120 * Constructor function; Creates subscription response message with |
|
121 * following parameters. |
|
122 * @since Series60 2.6 |
|
123 * @param aSessionId Sennion id to respond. |
|
124 * @param aDestination Destination address. |
|
125 * @param aTimeStamp ETrue appends date-header to the message. |
|
126 * @param aSid Subscription id. |
|
127 * @param aTimeout Timeout defined by the Service. Integer or Infinite. |
|
128 * @return Response which is ready to send. |
|
129 */ |
|
130 IMPORT_C static CUpnpGenaMessage* SubscribeResponseL( |
|
131 TInt aSessionId, |
|
132 const TInetAddr& aDestination, |
|
133 TBool aTimeStamp, |
|
134 const TDesC8& aSid, |
|
135 const TDesC8& aTimeout ); |
|
136 |
|
137 /** |
|
138 * Constructor function; Creates unsubscription response message with |
|
139 * following parameters. |
|
140 * @since Series60 2.6 |
|
141 * @param aSessionId Sennion id to respond. |
|
142 * @param aDestination Destination address. |
|
143 */ |
|
144 IMPORT_C static CUpnpGenaMessage* UnsubscribeResponseL( |
|
145 TInt aSessionId, |
|
146 const TInetAddr& aDestination ); |
|
147 |
|
148 /** |
|
149 * Constructor function; Creates a event message header with following |
|
150 * parameters. |
|
151 * @since Series60 2.6 |
|
152 * @param aPath Publisher path. |
|
153 * @param aHost Publisher host and port. |
|
154 * @param aSid Subscription ID. |
|
155 * @param aSeq Sequence key. |
|
156 * @return Event-message without body. Attach body using SetBodyL-function. |
|
157 */ |
|
158 IMPORT_C static CUpnpGenaMessage* EventingLC( const TDesC8& aPath, |
|
159 TInetAddr& aHost, |
|
160 const TDesC8& aSid, |
|
161 TUint32 aSeq ); |
|
162 }; |
|
163 |
|
164 #endif // C_RUPNPGENAMESSAGEFACTORY_H |
|
165 |
|
166 // End of File |