1 /* |
|
2 * Copyright (c) 2005-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: source file for RNDIS uplink authorization notifier |
|
15 * |
|
16 */ |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #include <ecom/implementationproxy.h> |
|
24 #include <rndis/rndis.h> |
|
25 #include <rndis/rndisuiinterfaces.h> |
|
26 #include "rndisauthorizationnotifier.hrh" |
|
27 #include "rndisauthorizationnotifier.h" |
|
28 |
|
29 using namespace UsbRndis; |
|
30 |
|
31 CRndisAuthorizationNotifier* CRndisAuthorizationNotifier::NewLC() |
|
32 { |
|
33 CRndisAuthorizationNotifier* self = new (ELeave)CRndisAuthorizationNotifier(); |
|
34 CleanupStack::PushL(self); |
|
35 self->ConstructL(); |
|
36 return self; |
|
37 } |
|
38 |
|
39 CRndisAuthorizationNotifier::CRndisAuthorizationNotifier() |
|
40 { |
|
41 } |
|
42 |
|
43 void CRndisAuthorizationNotifier::ConstructL() |
|
44 { |
|
45 } |
|
46 |
|
47 CRndisAuthorizationNotifier::~CRndisAuthorizationNotifier() |
|
48 { |
|
49 } |
|
50 |
|
51 void CRndisAuthorizationNotifier::Release() |
|
52 { |
|
53 delete this; |
|
54 } |
|
55 |
|
56 CRndisAuthorizationNotifier::TNotifierInfo CRndisAuthorizationNotifier::RegisterL() |
|
57 { |
|
58 //Return TNotifierInfo, describes the parameters of the notifier |
|
59 iInfo.iUid = TUid::Uid(KUidUplinkAuthNotifierImp); |
|
60 iInfo.iChannel = TUid::Uid(KUidUplinkAuthNotifierImp); |
|
61 iInfo.iPriority = ENotifierPriorityHigh; |
|
62 return iInfo; |
|
63 } |
|
64 |
|
65 CRndisAuthorizationNotifier::TNotifierInfo CRndisAuthorizationNotifier::Info() const |
|
66 { |
|
67 //Return TNotifierInfo, describes the parameters of the notifier |
|
68 return iInfo; |
|
69 } |
|
70 |
|
71 TPtrC8 CRndisAuthorizationNotifier::StartL(const TDesC8& /*aBuffer*/) |
|
72 { |
|
73 // Do not support synchronous start, just return. |
|
74 return KNullDesC8(); |
|
75 } |
|
76 |
|
77 void CRndisAuthorizationNotifier::StartL(const TDesC8& /*aBuffer*/, TInt aReplySlot, const RMessagePtr2& aMessage) |
|
78 { |
|
79 // Just to set as DisAllow defaultly .. |
|
80 TRndisUplinkAuthorizationResultPckg selection(ERndisDisallowUplinkAccess); |
|
81 aMessage.Write(aReplySlot, selection); |
|
82 aMessage.Complete(KErrNone); |
|
83 } |
|
84 |
|
85 void CRndisAuthorizationNotifier::Cancel() |
|
86 { |
|
87 } |
|
88 |
|
89 TPtrC8 CRndisAuthorizationNotifier::UpdateL(const TDesC8&) |
|
90 { |
|
91 // Do not support update, just return. |
|
92 return KNullDesC8(); |
|
93 } |
|
94 |
|
95 CArrayPtr<MEikSrvNotifierBase2>* NotifierArrayL() |
|
96 { |
|
97 CArrayPtrFlat<MEikSrvNotifierBase2>* notifiers = new(ELeave) CArrayPtrFlat<MEikSrvNotifierBase2>(1); |
|
98 CleanupStack::PushL(notifiers); |
|
99 CRndisAuthorizationNotifier* notifier = CRndisAuthorizationNotifier::NewLC(); |
|
100 notifiers->AppendL(notifier); |
|
101 CleanupStack::Pop(2, notifiers); |
|
102 return notifiers; |
|
103 } |
|
104 |
|
105 // ECom plugin entry point |
|
106 const TImplementationProxy ImplementationTable[] = |
|
107 { |
|
108 IMPLEMENTATION_PROXY_ENTRY(KUidUplinkAuthNotifierImp, NotifierArrayL) |
|
109 }; |
|
110 |
|
111 // ECom plugin entry point |
|
112 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
113 { |
|
114 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
115 return ImplementationTable; |
|
116 } |
|