datasourcemodules/defaultpositioningmodule/inc/epos_defaultproxycommon.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 /*
       
     2 * Copyright (c) 2007-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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef EPOS_DEFAULTPROXYCOMMON_H
       
    21 #define EPOS_DEFAULTPROXYCOMMON_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <flogger.h>
       
    25 
       
    26 //Panic category
       
    27 _LIT( KPosDefaultProxyPanic, "EPosDefault" );
       
    28 
       
    29 //Panic code
       
    30 enum 
       
    31     {
       
    32     EDefaultProxyPanic_PosInfoNotNull       = 1,
       
    33     EDefaultProxyPanic_SimualtaneousLR      = 2,
       
    34     EDefaultProxyPanic_PosInfoSizeMismatch  = 3,
       
    35     EDefaultProxyPanic_PsyNotFoundInStateManager = 4,
       
    36     EDefaultProxyPanic_PsyNotFoundInPsyListHandler = 5,
       
    37     EDefaultProxyPanic_PsyNotFoundInExtGpsPsyMinitor = 6,
       
    38     EDefaultProxyPanic_GlobalObjectNotConstructed = 7
       
    39     };
       
    40 
       
    41 //Default proxy panic
       
    42 #define DefaultProxyPanic(x) User::Panic( KPosDefaultProxyPanic, x )
       
    43 
       
    44 
       
    45 // Logging macros
       
    46 #ifdef _DEBUG
       
    47 
       
    48 _LIT( KLoggingFolder, "DPsy" );
       
    49 _LIT( KLoggingFile, "log.txt" );
       
    50 _LIT( KLoggingFullName, "c:\\logs\\DPsy\\log.TXT" );
       
    51 
       
    52 #define TRACETEXT( S1 )         { RFileLogger::Write( KLoggingFolder(),\
       
    53 KLoggingFile(), EFileLoggingModeAppend, S1 ); }
       
    54 
       
    55 #define TRACESTRING( S1 )       { \
       
    56     _LIT( tempLogDes, S1 ); \
       
    57     RFileLogger::Write( KLoggingFolder(), KLoggingFile(), \
       
    58     EFileLoggingModeAppend, tempLogDes() ); \
       
    59     }
       
    60 
       
    61 #define TRACESTRING2( S1, S2 )  { \
       
    62     _LIT( tempLogDes, S1 ); \
       
    63     RFileLogger::WriteFormat( KLoggingFolder(), KLoggingFile(), \
       
    64     EFileLoggingModeAppend, TRefByValue < const TDesC>( tempLogDes() ), S2 ); \
       
    65     }
       
    66 
       
    67 #else   // _DEBUG
       
    68 #define CLEARTRACELOG 
       
    69 #define TRACETEXT( S1 )
       
    70 #define TRACESTRING( S1 )
       
    71 #define TRACESTRING2( S1, S2 )
       
    72 #endif  // _DEBUG
       
    73 
       
    74 
       
    75 #endif      // EPOS_DEFAULTPROXYCOMMON_H  
       
    76             
       
    77 // End of File