]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/protocol/log.h
Move code removing "-psn_xxx" command line arguments to common code.
[wxWidgets.git] / interface / wx / protocol / log.h
CommitLineData
0576cd9e
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/protocol/log.h
3// Purpose: interface of wxProtocolLog
4// Author: Vadim Zeitlin
5// Created: 2009-03-06
0576cd9e
VZ
6// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7// Licence: wxWindows licence
8///////////////////////////////////////////////////////////////////////////////
9
10/**
11 Class allowing to log network operations performed by wxProtocol.
12
13 @library{wxnet}
14 @category{net}
15
16 @see wxProtocol
17*/
18class wxProtocolLog
19{
20public:
21 /**
22 Create object doing the logging using wxLogTrace() with the specified
23 trace mask.
24
25 If you override DoLogString() in your class the @a traceMask may be
26 left empty but it must have a valid value if you rely on the default
27 DoLogString() implementation.
28 */
29 wxProtocolLog(const wxString& traceMask);
30
31 /**
32 Called by wxProtocol-derived objects to log strings sent to the server.
33
34 Default implementation prepends a client-to-server marker to @a str and
35 calls DoLogString().
36 */
37 virtual void LogRequest(const wxString& str);
38
39 /**
40 Called by wxProtocol-derived objects to log strings received from the
41 server.
42
43 Default implementation prepends a server-to-client marker to @a str and
44 calls DoLogString().
45 */
46 virtual void LogResponse(const wxString& str);
47
48protected:
49 /**
50 Log the given string.
51
52 This function is called from LogRequest() and LogResponse() and by
53 default uses wxLogTrace() with the trace mask specified in the
54 constructor but can be overridden to do something different by the
55 derived classes.
56 */
57 virtual void DoLogString(const wxString& str);
58};
59
60