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: Produces cm actions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CUPNPCMACTIONFACTORY_H |
|
21 #define C_CUPNPCMACTIONFACTORY_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include "upnpavcontrolpointobserver.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CUpnpService; |
|
30 class CUpnpAVControlPoint; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Factory class. |
|
36 * This class creates Connection Manager actions. |
|
37 * |
|
38 * @since Series 60 2.6 |
|
39 */ |
|
40 class CUpnpCmActionFactory : public CBase |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CUpnpCmActionFactory* NewL( |
|
48 MUpnpAVControlPointObserver& aAVCPObserver, |
|
49 CUpnpAVControlPoint& aAVCP ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CUpnpCmActionFactory(); |
|
55 |
|
56 public: // New functions |
|
57 /** |
|
58 * This function creates an action for Connection Manager |
|
59 * GetProtocolInfo function. |
|
60 * @since Series 60 2.6 |
|
61 * @param aAction CUpnpAction pointer for created action. |
|
62 * @param aDevice Destination of action. |
|
63 * @return errorcode KErrNone if no errors. |
|
64 */ |
|
65 TInt CmProtocolInfoActionLC(CUpnpAction*& aAction, CUpnpDevice* aDevice); |
|
66 /** |
|
67 * This function creates an action for Connection Manager |
|
68 * GetCurrentConnections function. |
|
69 * @since Series 60 2.6 |
|
70 * @param aAction CUpnpAction pointer for created action. |
|
71 * @param aDevice Destination of action. |
|
72 * @return errorcode KErrNone if no errors. |
|
73 */ |
|
74 TInt CmCurrentConnectionsActionLC(CUpnpAction*& aAction, CUpnpDevice* aDevice); |
|
75 |
|
76 /** |
|
77 * This function creates an action for Connection Manager |
|
78 * PrepareForConnection function. |
|
79 * @since Series 60 2.6 |
|
80 * @param aAction CUpnpAction pointer for created action. |
|
81 * @param aDevice Destination of action. |
|
82 * @param aRemoteProtocolInfo. |
|
83 * @param aPeerConnectionManager. |
|
84 * @param aPeerConnectionID connection ID. |
|
85 * @param aDirection connection direction. |
|
86 * @return errorcode KErrNone if no errors. |
|
87 */ |
|
88 TInt CmPrepareConnectionActionLC( |
|
89 CUpnpAction*& aAction, |
|
90 CUpnpDevice* aDevice, |
|
91 const TDesC8& aRemoteProtocolInfo, |
|
92 const TDesC8& aPeerConnectionManager, |
|
93 TInt aPeerConnectionID, |
|
94 const TDesC8& aDirection); |
|
95 /** |
|
96 * This function creates an action for Connection Manager |
|
97 * ConnectionComplete function. |
|
98 * @since Series 60 2.6 |
|
99 * @param aAction created action |
|
100 * @param aDevice Action's target device. |
|
101 * @param aConnectionId target connection. |
|
102 * @return errorcode KErrNone if no errors. |
|
103 */ |
|
104 TInt CmConnectionCompleteActionLC( |
|
105 CUpnpAction*& aAction, |
|
106 CUpnpDevice* aDevice, |
|
107 TInt aConnectionId); |
|
108 /** |
|
109 * This function creates an action for Connection Manager |
|
110 * GetCurrentConnections function. |
|
111 * @since Series 60 2.6 |
|
112 * @param aAction created action |
|
113 * @param aDevice Action's target device. |
|
114 * @param aConnectionId target connection. |
|
115 * @return errorcode KErrNone if no errors. |
|
116 */ |
|
117 TInt CmCurrentConnectionInfoActionLC( |
|
118 CUpnpAction*& aAction, |
|
119 CUpnpDevice* aDevice, |
|
120 TInt aConnectionId); |
|
121 |
|
122 private: |
|
123 |
|
124 /** |
|
125 * C++ default constructor. |
|
126 */ |
|
127 CUpnpCmActionFactory( |
|
128 MUpnpAVControlPointObserver& aAVCPObserver, |
|
129 CUpnpAVControlPoint& aAVCP ); |
|
130 |
|
131 /** |
|
132 * By default Symbian 2nd phase constructor is private. |
|
133 */ |
|
134 void ConstructL(); |
|
135 |
|
136 private: // Data |
|
137 // Observer that is intrested about AVCP actions. |
|
138 MUpnpAVControlPointObserver& iAVControlPointObserver; |
|
139 // AVCP main class. |
|
140 CUpnpAVControlPoint& iAVCP; |
|
141 }; |
|
142 |
|
143 #endif // C_CUPNPCMACTIONFACTORY_H |
|
144 |
|
145 // End of File |
|