mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/musavaprofileregistryadapterstub.cpp
changeset 22 496ad160a278
parent 0 f0cf47e981f9
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Provide interface for the client requestin availability class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "musavaprofileregistryadapterstub.h"
       
    20 #include "musavaobserver.h"
       
    21 #include "musavaavailability.h"
       
    22 #include "musavasharedobject.h"
       
    23 #include "muslogger.h"
       
    24 #include "musavasettingsimp.h"
       
    25 #include "musavasip.h"
       
    26 #include "musavaconnectionmonitor.h"
       
    27 #include "mussettings.h"
       
    28 #include "EscapeUtils.h"
       
    29 
       
    30 #include <e32base.h>
       
    31 #include <sipprofileregistryobserver.h>
       
    32 
       
    33 
       
    34 // --------------------------------------------------------------------------
       
    35 // Symbian two-phase constructor
       
    36 // --------------------------------------------------------------------------
       
    37 //
       
    38 CMusAvaProfileRegistryAdapterStub* CMusAvaProfileRegistryAdapterStub::NewL()
       
    39     {
       
    40     CMusAvaProfileRegistryAdapterStub* self =
       
    41         CMusAvaProfileRegistryAdapterStub::NewLC();
       
    42     CleanupStack::Pop( self );
       
    43     return self;
       
    44     }
       
    45 
       
    46 
       
    47 // -------------------------------------------------------------------------
       
    48 //  Two-phased constructor.
       
    49 // -------------------------------------------------------------------------
       
    50 //
       
    51 CMusAvaProfileRegistryAdapterStub* CMusAvaProfileRegistryAdapterStub::NewLC()
       
    52     {
       
    53     CMusAvaProfileRegistryAdapterStub* self =
       
    54         new (ELeave) CMusAvaProfileRegistryAdapterStub();
       
    55     CleanupStack::PushL (self);
       
    56     self->ConstructL();
       
    57     return self;
       
    58     }
       
    59 
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 //  Destructor.
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 CMusAvaProfileRegistryAdapterStub::~CMusAvaProfileRegistryAdapterStub()
       
    66     {
       
    67     }
       
    68 
       
    69 
       
    70 // ---------------------------------------------------------------------------
       
    71 // Symbian 2nd phase constructor can leave.
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 void CMusAvaProfileRegistryAdapterStub::ConstructL()
       
    75     {
       
    76     }
       
    77 
       
    78 
       
    79 // -------------------------------------------------------------------------
       
    80 //  Constructor.
       
    81 // -------------------------------------------------------------------------
       
    82 //
       
    83 CMusAvaProfileRegistryAdapterStub::CMusAvaProfileRegistryAdapterStub()
       
    84     {
       
    85     iProfileId = 0;
       
    86     iEvent = MSIPProfileRegistryObserver::EProfileCreated;
       
    87     iError = -1;
       
    88     }
       
    89 
       
    90 // -------------------------------------------------------------------------
       
    91 // An event related to SIP Profile has accorred
       
    92 // -------------------------------------------------------------------------
       
    93 //
       
    94 void CMusAvaProfileRegistryAdapterStub::ProfileRegistryEventOccurred(
       
    95                         TUint32 aProfileId,
       
    96                         MSIPProfileRegistryObserver::TEvent aEvent)
       
    97     {
       
    98     iProfileId = aProfileId;
       
    99     iEvent = aEvent;
       
   100     }
       
   101 
       
   102 // -------------------------------------------------------------------------
       
   103 // An asynchronous error has occurred related to SIP profile
       
   104 // Event is send to those observers, who have the
       
   105 // corresponding profile instantiated.
       
   106 // -------------------------------------------------------------------------
       
   107 //
       
   108 void CMusAvaProfileRegistryAdapterStub::ProfileRegistryErrorOccurred(
       
   109     TUint32 aProfileId,
       
   110     TInt aError )
       
   111     {
       
   112     iProfileId = aProfileId;
       
   113     iError = aError;
       
   114     }
       
   115