fax/faxclientandserver/Inc/FAXLOG.H
changeset 20 244d7c5f118e
parent 19 1f776524b15c
child 23 6b1d113cdff3
equal deleted inserted replaced
19:1f776524b15c 20:244d7c5f118e
     1 // Copyright (c) 1997-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 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef __FAXLOG_H
       
    22 #define __FAXLOG_H
       
    23 
       
    24 
       
    25 #include <comms-infras/commsdebugutility.h>
       
    26 
       
    27 //-------------------------------------------------------------------------------------------
       
    28 //
       
    29 //  some logging macros definition.
       
    30 //  Unfortunately it is necessarily to use static logging functions because 
       
    31 //  Fax client and server can not use the same logging object from their multiple threads
       
    32 //
       
    33 //-------------------------------------------------------------------------------------------
       
    34 
       
    35 #ifdef _DEBUG
       
    36 
       
    37 _LIT8(KFaxSubSystem,        "fax");      //-- Fax subsystem name for logging
       
    38 _LIT8(KFaxCliComponent,     "FaxCli");   //-- Fax Client component name for logging
       
    39 _LIT8(KFaxServerComponent,  "FaxSrv");   //-- Fax server component name for logging (CFaxSession class etc.)
       
    40 _LIT8(KFaxStubComponent,    "FaxStub");  //-- Fax server stub component
       
    41 
       
    42 
       
    43 //-- N.B. It's necessary to use static logging macros because FaxServer and FaxClient use 
       
    44 //-- logging from different threads.
       
    45 
       
    46 //-- logging macros for Fax Server
       
    47 #define __FLOG_FAXSRV(AAA)           __FLOG_STATIC0(KFaxSubSystem,KFaxServerComponent,(AAA))
       
    48 #define __FLOG_FAXSRV1(AAA,BBB)      __FLOG_STATIC1(KFaxSubSystem,KFaxServerComponent,(AAA),(BBB))
       
    49 #define __FLOG_FAXSRV2(AAA,BBB,CCC)  __FLOG_STATIC2(KFaxSubSystem,KFaxServerComponent,(AAA),(BBB),(CCC))
       
    50                                      
       
    51 //-- logging macros for Fax Client
       
    52 #define __FLOG_FAXCLI(AAA)           __FLOG_STATIC0(KFaxSubSystem,KFaxCliComponent,(AAA))
       
    53 #define __FLOG_FAXCLI1(AAA,BBB)      __FLOG_STATIC1(KFaxSubSystem,KFaxCliComponent,(AAA),(BBB))
       
    54 #define __FLOG_FAXCLI2(AAA,BBB,CCC)  __FLOG_STATIC2(KFaxSubSystem,KFaxCliComponent,(AAA),(BBB),(CCC))
       
    55 
       
    56 //-- logging macros for Fax Stub
       
    57 #define __FLOG_FAXSTUB(AAA)          __FLOG_STATIC0(KFaxSubSystem,KFaxStubComponent,(AAA))
       
    58 #define __FLOG_FAXSTUB1(AAA,BBB)     __FLOG_STATIC1(KFaxSubSystem,KFaxStubComponent,(AAA),(BBB))
       
    59 #define __FLOG_FAXSTUB2(AAA,BBB,CCC) __FLOG_STATIC2(KFaxSubSystem,KFaxStubComponent,(AAA),(BBB),(CCC))
       
    60 
       
    61 #else  //_DEBUG
       
    62 
       
    63 #define __FLOG_FAXSRV(AAA)
       
    64 #define __FLOG_FAXSRV1(AAA,BBB)
       
    65 #define __FLOG_FAXSRV2(AAA,BBB,CCC)
       
    66 /**                                     
       
    67 logging macros for Fax Client
       
    68 @internalComponent
       
    69 */
       
    70 #define __FLOG_FAXCLI(AAA)
       
    71 #define __FLOG_FAXCLI1(AAA,BBB)
       
    72 #define __FLOG_FAXCLI2(AAA,BBB,CCC)
       
    73 
       
    74 /**
       
    75 logging macros for Fax Stub
       
    76 @internalComponent
       
    77 */
       
    78 #define __FLOG_FAXSTUB(AAA)
       
    79 #define __FLOG_FAXSTUB1(AAA,BBB)
       
    80 #define __FLOG_FAXSTUB2(AAA,BBB,CCC)
       
    81 
       
    82 
       
    83 #endif	//_DEBUG
       
    84 
       
    85 #endif  // __FAXLOG_H