PECengine/TransferAdapter2/Inc/PEngTransAdapterPanics.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2003 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:  Transfer adapter panics
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __PENGTRANSADAPTERPANICS_H__
       
    19 #define __PENGTRANSADAPTERPANICS_H__
       
    20 
       
    21 //  INCLUDES
       
    22 #include    <e32std.h>
       
    23 #include    <ImpsServices.h>
       
    24 #include    "CPEngSessionSlotId.h"
       
    25 
       
    26 
       
    27 // CONSTANTS
       
    28 /**
       
    29 * Presence Engine Transfer adapter Library panic category.
       
    30 *
       
    31 * @since 3.0
       
    32 */
       
    33 _LIT( KPEngTransferAdapterPanic, "PEngTranAdap" );
       
    34 
       
    35 /**
       
    36 * Presence Engine Transfer adapter Library panic reasons.
       
    37 *
       
    38 * Following panic reasons are used in
       
    39 * Transfer adapter Library panics.
       
    40 *
       
    41 * @since 3.0
       
    42 */
       
    43 enum TPEngTransferAdapterPanics
       
    44     {
       
    45     ESesionConsistencyLost                      = 1,
       
    46     EOpIdConsistencyLost                        = 2,
       
    47     ENoActiveOperations                         = 3,
       
    48     EUnknownUnumeration                         = 4,
       
    49     EReferenceCountUnderflow                    = 5,
       
    50     EIlegalSingletonDeletion                    = 6,
       
    51     EAccessHandlerObserversUnregistered         = 7,
       
    52     EUnknowPureData                             = 8,
       
    53     EListenerAlreadyActive                      = 9,
       
    54     ELogInDataNotValid                          = 10
       
    55 
       
    56     };
       
    57 
       
    58 
       
    59 /**
       
    60  *  Check Consistency of the Session ids
       
    61  *  Panics for Debug version if inconsistent
       
    62  *
       
    63  *  @since 3.0
       
    64  *  @param aSessionId PEC engine session Id
       
    65  *  @param aCspId WV Engine session Id
       
    66  */
       
    67 inline void CheckConsistency(
       
    68     const CPEngSessionSlotId& aSessionId,
       
    69     TImpsCspIdentifier& aCspId )
       
    70     {
       
    71     // panic if we get other session notification
       
    72     __ASSERT_DEBUG(
       
    73         ( aCspId.UserId().CompareF( aSessionId.UserId() ) == KErrNone ),
       
    74         User::Panic( KPEngTransferAdapterPanic, ESesionConsistencyLost ) );
       
    75     __ASSERT_DEBUG(
       
    76         ( aCspId.Sap().CompareF( aSessionId.ServiceAddress() ) == KErrNone ),
       
    77         User::Panic( KPEngTransferAdapterPanic, ESesionConsistencyLost ) );
       
    78 
       
    79     ( void ) aSessionId; // Prevent compilation warning about unused variable
       
    80     ( void ) aCspId; // Prevent compilation warning about unused variable
       
    81     }
       
    82 
       
    83 #endif  //__PENGTRANSADAPTERPANICS_H__
       
    84 
       
    85 //  End of File
       
    86