|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef SYMBIAN_NM_COMMON_H |
|
23 #define SYMBIAN_NM_COMMON_H |
|
24 |
|
25 #include <elements/metavirtctor.h> |
|
26 #include <ecom/implementationproxy.h> |
|
27 #include <elements/nm_common_internal.h> |
|
28 #include <elements/nm_log.h> |
|
29 |
|
30 namespace Messages |
|
31 { |
|
32 class MTransportSender; |
|
33 class MTransportReceiver; |
|
34 class TNodeId; |
|
35 |
|
36 static const TInt KNullMessageId = 0; |
|
37 |
|
38 |
|
39 //Messages panic category |
|
40 _LIT(KMessagesPanic, "Messages"); |
|
41 |
|
42 //Panics generated by the Messages module |
|
43 enum TMessagesPanics |
|
44 { |
|
45 /** RxxxInterface not opened with recipient peer details |
|
46 */ |
|
47 ETransportNotOpened = 1, |
|
48 EAddressCastPanic, |
|
49 EMessageCastPanic, |
|
50 EConstructedObjectTooBig, |
|
51 EAddressNotValidPanic, |
|
52 EClientNotValidPanic |
|
53 }; |
|
54 |
|
55 |
|
56 class CGlobals : public CGlobalsInternal |
|
57 { |
|
58 friend class TlsGlobals; |
|
59 |
|
60 public: |
|
61 TBool IsInterfaceRegistered(TUid aInterfaceId) const |
|
62 { |
|
63 return iVirtCtor->IsInterfaceRegistered(aInterfaceId); |
|
64 } |
|
65 |
|
66 void RegisterInterfaceL(TUid aInterfaceId, TInt aNumCtors, const TImplementationProxy* aCtorTable) |
|
67 { |
|
68 NM_LOG((KNodeMessagesSubTag, _L8("RegisterInterfaceL InterfaceId=%08x"),aInterfaceId)); |
|
69 iVirtCtor->RegisterInterfaceL(aInterfaceId, aNumCtors, aCtorTable); |
|
70 } |
|
71 |
|
72 void DeregisterInterface(TUid aInterfaceId) |
|
73 { |
|
74 NM_LOG((KNodeMessagesSubTag, _L8("DeregisterInterface InterfaceId=%08x"),aInterfaceId)); |
|
75 iVirtCtor->DeregisterInterface(aInterfaceId); |
|
76 } |
|
77 |
|
78 |
|
79 private: |
|
80 IMPORT_C explicit CGlobals(); |
|
81 IMPORT_C ~CGlobals(); |
|
82 IMPORT_C void ConstructL(); |
|
83 }; |
|
84 |
|
85 struct TlsGlobals |
|
86 { |
|
87 public: |
|
88 IMPORT_C static CGlobals& InstallGlobalsL(); |
|
89 IMPORT_C static void UnInstallGlobals(); |
|
90 IMPORT_C static CGlobals& Get(); |
|
91 }; |
|
92 |
|
93 } //namespace Messages |
|
94 |
|
95 |
|
96 #endif |
|
97 //SYMBIAN_NM_COMMON_H |
|
98 |