contentpublishingsrv/contentpublishingutils/contentpublishingdebug/inc/cpdebug.h
branchRCL_3
changeset 14 15e4dd19031c
parent 0 79c6a41cd166
equal deleted inserted replaced
12:502e5d91ad42 14:15e4dd19031c
    21 // INCLUDES
    21 // INCLUDES
    22 
    22 
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #ifdef CONTENT_PUBLISHER_DEBUG
    24 #ifdef CONTENT_PUBLISHER_DEBUG
    25 #include <f32file.h>
    25 #include <f32file.h>
       
    26 #include <liwgenericparam.h>
    26 
    27 
    27 _LIT(KCPDebugDirName, "contentpublisher" );
    28 _LIT(KCPDebugDirName, "contentpublisher" );
    28 _LIT(KCPDebugFileName, "c:\\contentpublisher.txt" );
    29 _LIT(KCPDebugFileName, "c:\\contentpublisher.txt" );
    29 _LIT(KCPDebugFileName2, "c:\\server.txt" );
    30 _LIT(KCPDebugFileName2, "c:\\server.txt" );
    30 
    31 
    60      * Print debug text to the file (c:\\contentpublisher.txt). 
    61      * Print debug text to the file (c:\\contentpublisher.txt). 
    61      *
    62      *
    62      */
    63      */
    63     IMPORT_C static void Printf(TRefByValue<const TDesC8> aFormat, ...);
    64     IMPORT_C static void Printf(TRefByValue<const TDesC8> aFormat, ...);
    64 
    65 
       
    66     /**
       
    67      * Print debug text to RDebug
       
    68      *
       
    69      */
       
    70     IMPORT_C static void ExtendedPrint( const char* aStringParam,
       
    71                                         const CLiwGenericParamList& aInParamList );
       
    72 
       
    73 
    65 private:
    74 private:
    66 
    75 
    67     CCPDebug();
    76     CCPDebug();
    68 
    77 
    69     void ConstructL( const TDesC& aFile );
    78     void ConstructL( const TDesC& aFile );
    82     struct DebugData* iData;
    91     struct DebugData* iData;
    83     
    92     
    84     };
    93     };
    85 
    94 
    86 #define CP_DEBUG(s)    CCPDebug::Printf(s)
    95 #define CP_DEBUG(s)    CCPDebug::Printf(s)
    87 
    96 #define CP_EXTENDED_DEBUG(s,p) CCPDebug::ExtendedPrint(s,p)
    88 /**
    97 /**
    89  * Thread local storage space. Writable static data is not supported in
    98  * Thread local storage space. Writable static data is not supported in
    90  * Symbian, so static data is stored in this struct.
    99  * Symbian, so static data is stored in this struct.
    91  */
   100  */
    92 struct DebugData
   101 struct DebugData
    98     RBuf iFileName;
   107     RBuf iFileName;
    99     };
   108     };
   100 
   109 
   101 #else
   110 #else
   102 
   111 
   103 #define CP_DEBUG(s) 
   112 #define CP_DEBUG(s)
       
   113 #define CP_EXTENDED_DEBUG(s,p)
   104 
   114 
   105 #endif
   115 #endif
   106 
   116 
   107 #endif // C_CP_DEBUG_H
   117 #endif // C_CP_DEBUG_H