|
1 /** @file |
|
2 * Copyright (c) 2008 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 MUpnpCpStackRequestor class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MUPNPCPSTACKREQUESTOR_H_ |
|
19 #define MUPNPCPSTACKREQUESTOR_H_ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <in_sock.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MUpnpDispatcherCustomer; |
|
27 class CUpnpHttpMessage; |
|
28 class CUpnpDispatcher; |
|
29 |
|
30 /** |
|
31 * @brief Class defines interface which separates controlpointbase |
|
32 * and serviceframework modules. |
|
33 * It makes possible switch serviceframework implementation to another one. |
|
34 * |
|
35 */ |
|
36 class MUpnpCpStackRequestor |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Sends a SSDP Search with 8-bit search string. |
|
42 * @param aSearchString String to use in SSDP ST header. |
|
43 */ |
|
44 virtual void SearchL( const TDesC8& aSearchString ) = 0; |
|
45 |
|
46 /** |
|
47 * Sends a SSDP Search with 16-bit search string. This method makes a |
|
48 * conversion to 8-bit and then makes the search. |
|
49 * @param aSearchString String to use in SSDP ST header. |
|
50 */ |
|
51 virtual void SearchL( const TDesC16& aSearchString ) = 0; |
|
52 |
|
53 /** |
|
54 * Add a customer to the customer list of this dispatcher. |
|
55 * It means that messages start being forwarded to that customer. |
|
56 * @param aCustomer The customer to be added. |
|
57 */ |
|
58 virtual void AddCustomerL( const MUpnpDispatcherCustomer& aCustomer ) = 0; |
|
59 |
|
60 /** |
|
61 * Remove a customer from the customer list of this dispatcher. |
|
62 * Messages are not forwarded to that customer. |
|
63 * @param aCustomer The customer to be removed. |
|
64 */ |
|
65 virtual void RemoveCustomer( const MUpnpDispatcherCustomer& aCustomer ) = 0; |
|
66 |
|
67 /** |
|
68 * Returns HTTP server address. |
|
69 * @return Buffer that contains the address. |
|
70 */ |
|
71 virtual TInetAddr HttpServerAddress() = 0; |
|
72 |
|
73 /** |
|
74 * Send a request via serviceframework loopback. Used for SOAP communication |
|
75 * between local control point and local device. |
|
76 * @param aMessage The message to be sent. |
|
77 * @param aCustomer Pointer to the callback interface. |
|
78 */ |
|
79 virtual void SendLocalRequestL( CUpnpHttpMessage* aMessage, |
|
80 MUpnpDispatcherCustomer& aCustomer ) = 0; |
|
81 |
|
82 /** |
|
83 * Send a HTTP client request. Used for description fetching, SOAP actions and |
|
84 * subscription requests. |
|
85 * @param aMessage The message to be sent. |
|
86 * @param aCustomer pointer to observer |
|
87 * @param aIsLocal |
|
88 */ |
|
89 virtual void SendMessageL( CUpnpHttpMessage* aMessage, |
|
90 MUpnpDispatcherCustomer& aCustomer, |
|
91 TBool aIsLocal ) = 0; |
|
92 |
|
93 /** |
|
94 * Stops ignoring incoming SSDP notification |
|
95 * for discovered device. |
|
96 * @param aUuids UUids. |
|
97 */ |
|
98 virtual void StopIgnoringL( const TDesC8& aUuids ) = 0; |
|
99 |
|
100 virtual void StartIPFilteringL() = 0; |
|
101 virtual void StopIPFiltering() = 0; |
|
102 |
|
103 /** |
|
104 * Stops htpp server |
|
105 */ |
|
106 virtual void StopHttpServer() = 0; |
|
107 |
|
108 /** |
|
109 * Starts htpp server |
|
110 */ |
|
111 virtual void StartHttpServerL() =0; |
|
112 }; |
|
113 |
|
114 #endif /*MUPNPCPSTACKREQUESTOR_H_*/ |