1 /* |
|
2 * Copyright (c) 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: This plugin enables the Catalogs PC client to communicate |
|
15 * with the Catalogs engine |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #include "catalogspcconnectivityplugin.h" |
|
22 |
|
23 |
|
24 |
|
25 // ======== MEMBER FUNCTIONS ======== |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 // Constructor |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 CCatalogsPCConnectivityPlugin::CCatalogsPCConnectivityPlugin() |
|
32 { |
|
33 } |
|
34 |
|
35 // --------------------------------------------------------------------------- |
|
36 // Empty |
|
37 // --------------------------------------------------------------------------- |
|
38 // |
|
39 void CCatalogsPCConnectivityPlugin::ConstructL() |
|
40 { |
|
41 } |
|
42 |
|
43 |
|
44 // --------------------------------------------------------------------------- |
|
45 // Standard symbian object constructing first phase |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 EXPORT_C CCatalogsPCConnectivityPlugin* CCatalogsPCConnectivityPlugin::NewL() |
|
49 { |
|
50 CCatalogsPCConnectivityPlugin* self = |
|
51 CCatalogsPCConnectivityPlugin::NewLC(); |
|
52 CleanupStack::Pop( self ); |
|
53 return self; |
|
54 } |
|
55 |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // Standard symbian object constructing first phase |
|
59 // --------------------------------------------------------------------------- |
|
60 // |
|
61 EXPORT_C CCatalogsPCConnectivityPlugin* CCatalogsPCConnectivityPlugin::NewLC() |
|
62 { |
|
63 CCatalogsPCConnectivityPlugin* self = |
|
64 new( ELeave ) CCatalogsPCConnectivityPlugin; |
|
65 CleanupStack::PushL( self ); |
|
66 self->ConstructL(); |
|
67 return self; |
|
68 } |
|
69 |
|
70 // --------------------------------------------------------------------------- |
|
71 // Destructor |
|
72 // --------------------------------------------------------------------------- |
|
73 // |
|
74 EXPORT_C CCatalogsPCConnectivityPlugin::~CCatalogsPCConnectivityPlugin() |
|
75 { |
|
76 iClient.Close(); |
|
77 } |
|
78 |
|
79 |
|
80 // --------------------------------------------------------------------------- |
|
81 // Connect to Catalogs engine pc client front-end |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 EXPORT_C TInt CCatalogsPCConnectivityPlugin::Connect() |
|
85 { |
|
86 return iClient.Connect(); |
|
87 } |
|
88 |
|
89 // --------------------------------------------------------------------------- |
|
90 // Close the connection to Catalogs engine pc client front-end |
|
91 // --------------------------------------------------------------------------- |
|
92 // |
|
93 EXPORT_C void CCatalogsPCConnectivityPlugin::Close() |
|
94 { |
|
95 iClient.Close(); |
|
96 } |
|
97 |
|
98 // --------------------------------------------------------------------------- |
|
99 // Give all MIME types supported by this component |
|
100 // --------------------------------------------------------------------------- |
|
101 // |
|
102 EXPORT_C RPointerArray<TDataType> CCatalogsPCConnectivityPlugin:: |
|
103 SupportedMimeTypesL() |
|
104 { |
|
105 return iClient.SupportedMimeTypesL(); |
|
106 } |
|
107 |
|
108 // --------------------------------------------------------------------------- |
|
109 // Data package from PC Client |
|
110 // --------------------------------------------------------------------------- |
|
111 // |
|
112 EXPORT_C void CCatalogsPCConnectivityPlugin::PutDataL( |
|
113 const TDataType& aMimeType, const CBufFlat& aData ) |
|
114 { |
|
115 iClient.PutDataL( aMimeType, aData ); |
|
116 } |
|
117 |
|
118 // --------------------------------------------------------------------------- |
|
119 // Data request from PC Client |
|
120 // --------------------------------------------------------------------------- |
|
121 // |
|
122 EXPORT_C void CCatalogsPCConnectivityPlugin::GetDataL( |
|
123 TDataType& aMimeType, CBufFlat& aData ) |
|
124 { |
|
125 iClient.GetDataL( aMimeType, aData ); |
|
126 } |
|
127 |
|
128 |
|
129 // ======== GLOBAL FUNCTIONS ======== |
|
130 |
|
131 // --------------------------------------------------------------------------- |
|
132 // Dll entry point |
|
133 // --------------------------------------------------------------------------- |
|
134 // |
|
135 GLDEF_C TInt E32Dll() |
|
136 { |
|
137 return( KErrNone ); |
|
138 } |
|
139 |
|