1 /* |
|
2 * Copyright (c) 2002-2009 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: CSConCSC implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // |
|
20 // This program creates a polymorphic interface DLL that is used |
|
21 // to create capability object |
|
22 // |
|
23 |
|
24 // INCLUDE FILES |
|
25 |
|
26 #include <e32def.h> |
|
27 #include <e32uid.h> |
|
28 |
|
29 #include "sconcsc.h" |
|
30 #include "capinfo.h" |
|
31 #include "debug.h" |
|
32 |
|
33 // ============================= MEMBER FUNCTIONS =============================== |
|
34 |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CreateCSConCSCL() |
|
38 // Function to construct CSConCSC object. Note that this function |
|
39 // is exported at ordinal 1 and is not a member of any class. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 EXPORT_C CSConCSC* CreateCSConCSCL() |
|
43 { |
|
44 TRACE_FUNC; |
|
45 return CSConCSC::NewL(); |
|
46 } |
|
47 |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CSConCSC::NewL() |
|
51 // Two-phase constructor |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 CSConCSC* CSConCSC::NewL() |
|
55 { |
|
56 TRACE_FUNC_ENTRY; |
|
57 CSConCSC* self = new (ELeave) CSConCSC(); |
|
58 CleanupStack::PushL( self ); |
|
59 self->ConstructL(); |
|
60 CleanupStack::Pop( self ); |
|
61 TRACE_FUNC_EXIT; |
|
62 return self; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CSConCSC::~CSConCSC() |
|
67 // Destructor |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 CSConCSC::~CSConCSC() |
|
71 { |
|
72 TRACE_FUNC_ENTRY; |
|
73 delete iCapInfo; |
|
74 TRACE_FUNC_EXIT; |
|
75 } |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // CSConCSC::CapabilityObject(CBufFlat& aBuf) |
|
79 // Creates a capability object data and sets data into aBuf. |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 TInt CSConCSC::CapabilityObject(CBufFlat& aBuf) |
|
83 { |
|
84 TRACE_FUNC_ENTRY; |
|
85 TRAPD(err, CSConCSC::CapabilityObjectL(aBuf)); |
|
86 LOGGER_WRITE_1( "CSConCSC::CapabilityObject(CBufFlat& aBuf) : returned %d", err ); |
|
87 return err; |
|
88 } |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // CSConCSC::ConstructL() |
|
92 // Initializes member data |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 void CSConCSC::ConstructL() |
|
96 { |
|
97 iCapInfo = CCapInfo::NewL(); |
|
98 } |
|
99 |
|
100 // ----------------------------------------------------------------------------- |
|
101 // CSConCSC::CSConCSC() |
|
102 // Default constructor |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 CSConCSC::CSConCSC() |
|
106 { |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CSConCSC::CapabilityObjectL(CBufFlat& aBuf) |
|
111 // Creates a capability object data and sets data into aBuf. |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 void CSConCSC::CapabilityObjectL(CBufFlat& aBuf) |
|
115 { |
|
116 TRACE_FUNC_ENTRY; |
|
117 iCapInfo->CapabilityDocumentL( &aBuf ); |
|
118 TRACE_FUNC_EXIT; |
|
119 } |
|
120 |
|
121 // End of file |
|
122 |
|