1 /* |
|
2 * Copyright (c) 2007 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: Interface for General Setting plug-in. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32std.h> |
|
20 #include <aknview.h> |
|
21 |
|
22 class CCamGSInterface : public CAknView |
|
23 { |
|
24 public: // New functions |
|
25 |
|
26 /** |
|
27 * Wraps ECom object instantitation. |
|
28 * @param aUid Specifies the concrete implementation. |
|
29 */ |
|
30 static CCamGSInterface* NewL( const TUid aUid ); |
|
31 |
|
32 |
|
33 /** |
|
34 * Notifies framwork that this instance is being destroyed and resources |
|
35 * can be released. |
|
36 */ |
|
37 void DestroyPlugin(); |
|
38 |
|
39 protected: |
|
40 /** iDtor_ID_Key Instance identifier key. When instance of an |
|
41 * implementation is created by ECOM framework, the |
|
42 * framework will assign UID for it. The UID is used in |
|
43 * destructor to notify framework that this instance is |
|
44 * being destroyed and resources can be released. |
|
45 */ |
|
46 TUid iDtor_ID_Key; |
|
47 }; |
|
48 |
|
49 |
|
50 // ---------------------------------------------------- |
|
51 // CCamGSInterface::NewL |
|
52 // Creates General Settings plugin. |
|
53 // ---------------------------------------------------- |
|
54 // |
|
55 inline CCamGSInterface* CCamGSInterface::NewL( const TUid aUid ) |
|
56 { |
|
57 TAny* ext = REComSession::CreateImplementationL( |
|
58 aUid, _FOFF( CCamGSInterface, iDtor_ID_Key ) ); |
|
59 |
|
60 CCamGSInterface* result = |
|
61 reinterpret_cast< CCamGSInterface* >( ext ); |
|
62 return result; |
|
63 } |
|
64 |
|
65 |
|
66 // ---------------------------------------------------- |
|
67 // CCamGSInterface::DestroyPlugin |
|
68 // Destroy Ecom plugin. |
|
69 // ---------------------------------------------------- |
|
70 // |
|
71 inline void CCamGSInterface::DestroyPlugin() |
|
72 { |
|
73 REComSession::DestroyedImplementation( iDtor_ID_Key ); |
|
74 } |
|