datacommsserver/networkingdialogapi/agentnotifier/src/agentDummyNotifier.cpp
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2003-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 #include <e32std.h>
       
    17 #include <e32base.h>
       
    18 #include "agentnotifierdefs.h"
       
    19 #include "agentDummyNotifier.h"
       
    20 
       
    21 EXPORT_C CArrayPtr<MNotifierBase2>* NotifierArray()
       
    22 //
       
    23 // Lib main entry point
       
    24 //
       
    25 	{
       
    26 	CArrayPtrFlat<MNotifierBase2>* subjects=new (ELeave)CArrayPtrFlat<MNotifierBase2>(1);
       
    27 	CleanupStack::PushL(subjects);
       
    28 	subjects->AppendL(CAgentDummyNotifier::NewL());
       
    29 	CleanupStack::Pop();//subjects
       
    30 	return(subjects);
       
    31 	}
       
    32 
       
    33 
       
    34 /*
       
    35  * CAgentDummyNotifier
       
    36  */
       
    37 
       
    38 CAgentDummyNotifier* CAgentDummyNotifier::NewL()
       
    39 	{
       
    40 	CAgentDummyNotifier* self = new (ELeave) CAgentDummyNotifier();
       
    41 	CleanupStack::PushL(self);
       
    42 	self->ConstructL();
       
    43 	CleanupStack::Pop();
       
    44 	return self;
       
    45 	}
       
    46 
       
    47 CAgentDummyNotifier::CAgentDummyNotifier()
       
    48 	{
       
    49 	}
       
    50 
       
    51 void CAgentDummyNotifier::ConstructL()
       
    52 	{
       
    53 	}
       
    54 
       
    55 CAgentDummyNotifier::~CAgentDummyNotifier()
       
    56 	{
       
    57 	}
       
    58 
       
    59 void CAgentDummyNotifier::Release()
       
    60 	{
       
    61 	delete this;
       
    62 	}
       
    63 
       
    64 CAgentDummyNotifier::TNotifierInfo CAgentDummyNotifier::RegisterL()
       
    65 	/**
       
    66 	 * Called when a notifier is first loaded to allow any initial construction that is required.
       
    67 	 */
       
    68 	{
       
    69 	iInfo.iUid=KUidDummyAgentDialogNotifier;
       
    70 	iInfo.iChannel=KUidDummyAgentDialogNotifier;
       
    71 	iInfo.iPriority=ENotifierPriorityLow;
       
    72 	return iInfo;
       
    73 	}
       
    74 
       
    75 CAgentDummyNotifier::TNotifierInfo CAgentDummyNotifier::Info() const
       
    76 	/**
       
    77 	 * Return the previously generated info about the notifier
       
    78 	 */
       
    79 	{
       
    80 	return iInfo;
       
    81 	}
       
    82 
       
    83 TPtrC8 CAgentDummyNotifier::StartL(const TDesC8& /*aBuffer*/)
       
    84 	/**
       
    85 	 * Start the notifier with data aBuffer.
       
    86 	 * May be called multiple times if more than one client starts the notifier.
       
    87 	 */
       
    88 	{
       
    89 	TPtrC8 ret(KNullDesC8);
       
    90 	return (ret);
       
    91 	}
       
    92 	
       
    93 void CAgentDummyNotifier::StartL(const TDesC8& /*aBuffer*/, TInt /*aReplySlot*/, const RMessagePtr2& aMessage)
       
    94 	/**
       
    95 	 * Start the notifier with data aBuffer.  aMessage should be completed when the notifier is deactivated.
       
    96 	 * May be called multiple times if more than one client starts the notifier.  The notifier is immediately
       
    97 	 * responsible for completing aMessage.
       
    98 	 */
       
    99 	{
       
   100 	// just complete the message
       
   101 	aMessage.Complete(EAgentYesPressed); // assume yes is the right answer
       
   102 	}
       
   103 
       
   104 void CAgentDummyNotifier::Cancel()
       
   105 	/**
       
   106 	 * The notifier has been deactivated so resources can be freed and outstanding messages completed.
       
   107 	 */
       
   108 	{
       
   109 	}
       
   110 
       
   111 TPtrC8 CAgentDummyNotifier::UpdateL(const TDesC8& /*aBuffer*/)
       
   112 	/**
       
   113 	 * Update a currently active notifier with data aBuffer.
       
   114 	 */
       
   115 	{
       
   116 	TPtrC8 ret(KNullDesC8);
       
   117 	return (ret);
       
   118 	}
       
   119