|
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: RUpnpSsdpMessageFactory is responisble for creating SSDP messages |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_RUPNPSSDPMESSAGEFACTORY_H |
|
20 #define C_RUPNPSSDPMESSAGEFACTORY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "upnpssdpmessage.h" |
|
25 |
|
26 // DATA TYPES |
|
27 typedef CUpnpSsdpMessage CSsdpAdvertise; |
|
28 typedef CUpnpSsdpMessage CSsdpSearch; |
|
29 typedef CUpnpSsdpMessage CSsdpSearchResponse; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * SSDP Message Factory. Used to create standard SSDP messages. |
|
34 * |
|
35 * @since Series60 2.0 |
|
36 */ |
|
37 class RUpnpSsdpMessageFactory |
|
38 { |
|
39 public: |
|
40 |
|
41 |
|
42 /** |
|
43 * Constructor function; Creates standard alive message |
|
44 * with following parameters. |
|
45 * @since Series60 2.0 |
|
46 * @param aLoc Value of the Location-header. |
|
47 * @param aNt Value of the NT-header. |
|
48 * @param aUsn Value of the USN-header. |
|
49 * @param aServerDesc Value of the server description-header. |
|
50 * @return CSsdpAdvertise pointer |
|
51 */ |
|
52 IMPORT_C static CSsdpAdvertise* AdvertiseAliveL( TDesC8& aLoc, |
|
53 TDesC8& aNt, |
|
54 TDesC8& aUsn, |
|
55 TDesC8& aServerDesc ); |
|
56 |
|
57 /** |
|
58 * Constructor function; Creates standard byebye message |
|
59 * with following parameters. |
|
60 * @since Series60 2.0 |
|
61 * @param aNt Value of the NT-header. |
|
62 * @param aUsn Value of the USN-header. |
|
63 * @param aServerDesc Value of the server description-header. |
|
64 * @return CSsdpAdvertise pointer |
|
65 */ |
|
66 IMPORT_C static CSsdpAdvertise* AdvertiseByebyeL( TDesC8& aNt, |
|
67 TDesC8& aUsn); |
|
68 |
|
69 /** |
|
70 * Constructor function; Creates standard search message |
|
71 * with following parameters. |
|
72 * @since Series60 2.0 |
|
73 * @param aTarget Value of the ST-header. |
|
74 * @return CSsdpSearch pointer |
|
75 */ |
|
76 IMPORT_C static CSsdpSearch* SearchL( TDesC8& aTarget ); |
|
77 |
|
78 /** |
|
79 * Constructor function; Creates standard search message |
|
80 * with following parameters. |
|
81 * @since Series60 2.0 |
|
82 * @param aTarget Value of the ST-header. |
|
83 * @param aMaximumWaitTime Value of the MX-header. |
|
84 * @return CSsdpSearch pointer |
|
85 */ |
|
86 IMPORT_C static CSsdpSearch* SearchL( TDesC8& aTarget, |
|
87 TDesC8& aMaximumWaitTime ); |
|
88 |
|
89 /** |
|
90 * Constructor function; Creates standard search response message |
|
91 * with following parameters. |
|
92 * @since Series60 2.0 |
|
93 * @param aSt Value of the ST-header. |
|
94 * @param aUsn Value of the USN-header. |
|
95 * @param aLoc Value of the Location-header. |
|
96 * @param aServerDesc Value of the Server description-header. |
|
97 * @return CSsdpSearchResponse pointer |
|
98 */ |
|
99 IMPORT_C static CSsdpSearchResponse* ResponseL( TDesC8& aSt, |
|
100 TDesC8& aUsn, |
|
101 TDesC8& aLoc, |
|
102 TDesC8& aServerDesc ); |
|
103 }; |
|
104 |
|
105 #endif // C_RUPNPSSDPMESSAGEFACTORY_H |
|
106 |
|
107 // End of File |