PECengine/PresenceManager2/SrcReactAuth/CPEngReactAuthNotifier.cpp
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Notifier API to listen presence reactive authorization changes.
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include "CPEngReactAuthNotifier.h"
       
    20 #include "CPEngReactAuthNotifierImp.h"
       
    21 
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 
       
    26 // -----------------------------------------------------------------------------
       
    27 // CPEngReactAuthNotifier::NewL()
       
    28 // Two-phased constructor.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C CPEngReactAuthNotifier* CPEngReactAuthNotifier::NewL(
       
    32     const CPEngNWSessionSlotID2& aNWSessionSlotID,
       
    33     TInt aPriority )
       
    34     {
       
    35     CPEngReactAuthNotifier* self = CPEngReactAuthNotifier::NewLC(
       
    36                                        aNWSessionSlotID,
       
    37                                        aPriority );
       
    38     CleanupStack::Pop( self );
       
    39     return self;
       
    40     }
       
    41 
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CPEngReactAuthNotifier::NewLC()
       
    45 // Two-phased constructor.
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 EXPORT_C CPEngReactAuthNotifier* CPEngReactAuthNotifier::NewLC(
       
    49     const CPEngNWSessionSlotID2& aNWSessionSlotID,
       
    50     TInt aPriority )
       
    51     {
       
    52     CPEngReactAuthNotifier* self = new ( ELeave ) CPEngReactAuthNotifier;
       
    53     CleanupStack::PushL( self );
       
    54     self->iImp = CPEngReactAuthNotifierImp::NewL( *self,
       
    55                                                   aPriority,
       
    56                                                   aNWSessionSlotID );
       
    57     return self;
       
    58     }
       
    59 
       
    60 
       
    61 
       
    62 // Destructor
       
    63 CPEngReactAuthNotifier::~CPEngReactAuthNotifier()
       
    64     {
       
    65     delete iImp;
       
    66     }
       
    67 
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // CPEngReactAuthNotifier::CPEngReactAuthNotifier
       
    71 // C++ default constructor can NOT contain any code, that
       
    72 // might leave.
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 CPEngReactAuthNotifier::CPEngReactAuthNotifier()
       
    76     {
       
    77     }
       
    78 
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // CPEngReactAuthNotifier::Start()
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 
       
    85 EXPORT_C TInt CPEngReactAuthNotifier::Start( TInt aOptions )
       
    86     {
       
    87     return iImp->Start( aOptions );
       
    88     }
       
    89 
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 // CPEngReactAuthNotifier::Stop()
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 EXPORT_C void CPEngReactAuthNotifier::Stop()
       
    96     {
       
    97     iImp->Stop();
       
    98     }
       
    99 
       
   100 
       
   101 // -----------------------------------------------------------------------------
       
   102 // CPEngReactAuthNotifier::IsActive()
       
   103 // -----------------------------------------------------------------------------
       
   104 //
       
   105 EXPORT_C TBool CPEngReactAuthNotifier::IsActive() const
       
   106     {
       
   107     return iImp->IsActive();
       
   108     }
       
   109 
       
   110 
       
   111 // -----------------------------------------------------------------------------
       
   112 // CPEngReactAuthNotifier::AddObserver()
       
   113 // -----------------------------------------------------------------------------
       
   114 //
       
   115 EXPORT_C TInt CPEngReactAuthNotifier::AddObserver(
       
   116     MPEngReactAuthObserver& aObserver )
       
   117 
       
   118     {
       
   119     return iImp->AddObserver( aObserver );
       
   120     }
       
   121 
       
   122 
       
   123 // -----------------------------------------------------------------------------
       
   124 // CPEngReactAuthNotifier::RemoveObserver()
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 EXPORT_C TInt CPEngReactAuthNotifier::RemoveObserver(
       
   128     MPEngReactAuthObserver& aObserver )
       
   129 
       
   130     {
       
   131     return iImp->RemoveObserver( aObserver );
       
   132     }
       
   133 
       
   134 
       
   135 // End of File
       
   136 
       
   137