usbuis/rndisui/src/rndisrefusalnotifier.cpp
changeset 2 468cfcb53fd1
parent 1 705ec7b86991
child 3 47c263f7e521
equal deleted inserted replaced
1:705ec7b86991 2:468cfcb53fd1
     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 refusal notifier
       
    15 *
       
    16 */
       
    17 
       
    18 /**
       
    19 @file
       
    20 @internalComponent
       
    21 */
       
    22 
       
    23 #include <ecom/implementationproxy.h>
       
    24 #include <rndis/rndisuiinterfaces.h>
       
    25 #include "rndisrefusalnotifier.hrh"
       
    26 #include "rndisrefusalnotifier.h"
       
    27 
       
    28 using namespace UsbRndis;
       
    29 
       
    30 //Number of notifier needed.
       
    31 const TInt KNotfierCount = 1;
       
    32 
       
    33 CRndisNetworkConnectionRefusalNotifier* CRndisNetworkConnectionRefusalNotifier::NewLC()
       
    34 	{
       
    35 	CRndisNetworkConnectionRefusalNotifier* self = new (ELeave) CRndisNetworkConnectionRefusalNotifier;
       
    36 	CleanupStack::PushL(self);
       
    37 	self->ConstructL();
       
    38 	return self;
       
    39 	}
       
    40 
       
    41 CRndisNetworkConnectionRefusalNotifier::CRndisNetworkConnectionRefusalNotifier()
       
    42 	{
       
    43 	}
       
    44 
       
    45 CRndisNetworkConnectionRefusalNotifier::~CRndisNetworkConnectionRefusalNotifier()
       
    46 	{
       
    47 	}
       
    48 
       
    49 void CRndisNetworkConnectionRefusalNotifier::ConstructL()
       
    50 	{
       
    51 	}
       
    52 
       
    53 void CRndisNetworkConnectionRefusalNotifier::Release()
       
    54 	{
       
    55 	delete this;
       
    56 	}
       
    57 
       
    58 MEikSrvNotifierBase2::TNotifierInfo CRndisNetworkConnectionRefusalNotifier::RegisterL()
       
    59 	{
       
    60 	iInfo.iUid=TUid::Uid(KUidNetworkConnectionRefusalNotifierImp);
       
    61 	iInfo.iChannel = TUid::Uid(KUidNetworkConnectionRefusalNotifierImp);
       
    62 	iInfo.iPriority=ENotifierPriorityHigh;
       
    63 	return iInfo;
       
    64 	}
       
    65 
       
    66 MEikSrvNotifierBase2::TNotifierInfo CRndisNetworkConnectionRefusalNotifier::Info() const
       
    67 	{
       
    68 	return iInfo;
       
    69 	}
       
    70 
       
    71 TPtrC8 CRndisNetworkConnectionRefusalNotifier::StartL(const TDesC8& aBuffer)
       
    72 	{
       
    73 	return aBuffer;
       
    74 	}
       
    75  
       
    76 void CRndisNetworkConnectionRefusalNotifier::StartL(const TDesC8& /*aBuffer*/, TInt /*aReplySlot*/, const RMessagePtr2& aMessage)
       
    77 	{
       
    78 	aMessage.Complete(KErrNone);
       
    79 	}
       
    80 
       
    81 void CRndisNetworkConnectionRefusalNotifier::Cancel()
       
    82 	{
       
    83 	}
       
    84 
       
    85 TPtrC8 CRndisNetworkConnectionRefusalNotifier::UpdateL(const TDesC8& aBuffer)
       
    86 	{
       
    87 	return aBuffer;
       
    88 	}
       
    89 
       
    90 CArrayPtr<MEikSrvNotifierBase2>* NotifierArrayL()
       
    91 	{
       
    92 	CArrayPtr<MEikSrvNotifierBase2>* array = new(ELeave) CArrayPtrFlat<MEikSrvNotifierBase2>(KNotfierCount);
       
    93 	CleanupStack::PushL(array);
       
    94 	array->AppendL(CRndisNetworkConnectionRefusalNotifier::NewLC()); 
       
    95 	CleanupStack::Pop(2, array);
       
    96 	return array;
       
    97 	}
       
    98 
       
    99 // ECom plugin entry point
       
   100 const TImplementationProxy ImplementationTable[] =
       
   101 	{ 		
       
   102 	IMPLEMENTATION_PROXY_ENTRY(KUidNetworkConnectionRefusalNotifierImp, NotifierArrayL) 
       
   103 	};
       
   104 
       
   105 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
   106 	{
       
   107 	aTableCount = sizeof(ImplementationTable)/sizeof(TImplementationProxy);
       
   108 	return ImplementationTable;
       
   109 	}