1 // Copyright (c) 2000-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
29 Logs a literal string specified in a, assuming iLog is an MWapPushLog object.
31 #define __LOG_ALWAYS(a) {_LIT(name,a); iLog.WPLPrintf(name);}
34 Logs a literal string specified in a, assuming iLog is a pointer to a MWapPushLog
37 #define __LOG_PTR_ALWAYS(a) {_LIT(name,a); if(iLog) iLog->WPLPrintf(name);}
40 Logs a literal string specified in a, assuming aLog is a MWapPushLog object.
42 #define __LOG_PAR_ALWAYS(a) {_LIT(name,a); aLog.WPLPrintf(name);}
45 Logs an error descriptor and integer error code specified in name and a respectively,
46 assuming iLog is a MWapPushLog object.
48 #define __LOG_ERROR_ALWAYS(a,b) {_LIT(name,a); iLog.WPLLogError(name,b);}
53 Logs, in debug builds only, a literal string specified in a, assuming iLog
54 is an MWapPushLog object.
56 #define __LOG_DEBUG(a) __LOG_ALWAYS(a)
59 Logs, in debug builds only, a literal string specified in a, assuming iLog
60 is a pointer to a MWapPushLog object.
62 #define __LOG_PTR_DEBUG(a) __LOG_PTR_ALWAYS(a)
65 Logs, in debug builds only, a literal string specified in a, assuming aLog
66 is a MWapPushLog object.
68 #define __LOG_PAR_DEBUG(a) __LOG_PAR_ALWAYS(a)
71 Logs, in debug builds only, a CPushMessage specified in a, assuming iLog is
72 an MWapPushLog object.
74 #define __LOG_MSG_DEBUG(a) iLog.WPLPrintfL(a)
77 Logs, in debug builds only, an error descriptor and integer error code specified
78 in name and a respectively, assuming iLog is a MWapPushLog object.
80 #define __LOG_ERROR_DEBUG(a,b) __LOG_ERROR_ALWAYS(a,b)
82 /** Logs always. iLog is an MWapPushLog object*/
83 #define __LOG_DEBUG(a)
84 /** Logs always. iLog is an MWapPushLog pointer*/
85 #define __LOG_PTR_DEBUG(a)
86 /** Logs always. iLog is an MWapPushLog object*/
87 #define __LOG_PAR_DEBUG(a)
88 /** Logs always. iLog is CPushMessage specified in MWapPushLog object*/
89 #define __LOG_MSG_DEBUG(a)
90 /** Logs error in debug mode */
91 #define __LOG_ERROR_DEBUG(a,b)
101 Abstract WAP Push log access interface: logging is primarily for debugging.
103 The standard Symbian OS WAP Push watcher component writes to a log at c:\\logs\\watcher\\watcher.txt
104 if the c:\\logs\\watcher\\ directory exists. It supplies this interface to push
105 plug-ins through CPushHandlerBase::SetLogger(). The plug-in can then call
106 the interface's functions to add its own messages to the log.
115 Writes a string to the log.
120 virtual void WPLPrintf(const TDesC& aDescription)=0;
123 Writes a push message to the log.
125 It writes the message's content-type, date, expiry, and application-ID headers
126 as text, and the complete headers and message body in binary form.
131 virtual void WPLPrintfL(CPushMessage& aMessage)=0;
134 Writes a binary buffer to the log.
136 The buffer is written as six hexadecimal bytes per line: e.g.
146 virtual void WPLLogBinaryAsHex(const TDesC& aDescription)=0;
149 Writes an error message and code to the log.
157 virtual void WPLLogError(const TDesC& aDescription,TInt aError)=0;