| Version: 3.2.5

Public Member Functions | Protected Member Functions | List of all members
wxDebugReportUpload Class Reference
Class List by Category » Debugging

`#include <wx/debugrpt.h>`

Inheritance diagram for wxDebugReportUpload:
[legend]

## Detailed Description

This class is used to upload a compressed file using HTTP POST request.

As this class derives from wxDebugReportCompress, before upload the report is compressed in a single ZIP file.

##

Library: wxQA
Category: Debugging

## Public Member Functions

| wxDebugReportUpload (const wxString &url, const wxString &input, const wxString &action, const wxString &curl="curl")
| This class will upload the compressed file created by its base class to an HTML multipart/form-data form at the specified address. More...
Public Member Functions inherited from wxDebugReportCompress
| wxDebugReportCompress ()
| Default constructor does nothing special. More...
void | SetCompressedFileDirectory (const wxString &dir)
| Set the directory where the debug report should be generated. More...
void | SetCompressedFileBaseName (const wxString &name)
| Set the base name of the generated debug report file. More...
const wxString & | GetCompressedFileName () const
| Returns the full path of the compressed file (empty if creation failed). More...
Public Member Functions inherited from wxDebugReport
| wxDebugReport ()
| The constructor creates a temporary directory where the files that will be included in the report are created. More...
virtual | ~wxDebugReport ()
| The destructor normally destroys the temporary directory created in the constructor with all the files it contains. More...
void | AddAll (Context context=Context_Exception)
| Adds all available information to the report. More...
virtual bool | AddContext (Context ctx)
| Add an XML file containing the current or exception context and the stack trace. More...
bool | AddCurrentContext ()
| The same as calling AddContext(Context_Current). More...
bool | AddCurrentDump ()
| The same as calling AddDump(Context_Current). More...
virtual bool | AddDump (Context ctx)
| Adds the minidump file to the debug report. More...
bool | AddExceptionContext ()
| The same as calling AddContext(Context_Exception). More...
bool | AddExceptionDump ()
| The same as calling AddDump(Context_Exception). More...
virtual void | AddFile (const wxString &filename, const wxString &description)
| Add another file to the report. More...
bool | AddText (const wxString &filename, const wxString &text, const wxString &description)
| This is a convenient wrapper around AddFile(). More...
const wxString & | GetDirectory () const
| This method should be used to construct the full name of the files which you wish to add to the report using AddFile(). More...
bool | GetFile (size_t n, wxString *name, wxString *desc) const
| Retrieves the name (relative to GetDirectory()) and the description of the file with the given index. More...
size_t | GetFilesCount () const
| Gets the current number files in this report. More...
virtual wxString | GetReportName () const
| Gets the name used as a base name for various files, by default wxApp::GetAppName() is used. More...
bool | IsOk () const
| Returns true if the object was successfully initialized. More...
bool | Process ()
| Processes this report: the base class simply notifies the user that the report has been generated. More...
void | RemoveFile (const wxString &name)
| Removes the file from report: this is used by wxDebugReportPreview to allow the user to remove files potentially containing private information from the report. More...
void | Reset ()
| Resets the directory name we use. More...

## Protected Member Functions

virtual bool | OnServerReply (const wxArrayString &reply)
| This function may be overridden in a derived class to show the output from curl: this may be an HTML page or anything else that the server returned. More...
Protected Member Functions inherited from wxDebugReport
virtual void | DoAddCustomContext (wxXmlNode *nodeRoot)
| This function may be overridden to add arbitrary custom context to the XML context file created by AddContext(). More...
virtual bool | DoAddExceptionInfo (wxXmlNode *nodeContext)
| This function may be overridden to modify the contents of the exception tag in the XML context file. More...
virtual bool | DoAddLoadedModules (wxXmlNode *nodeModules)
| This function may be overridden to modify the contents of the modules tag in the XML context file. More...
virtual bool | DoAddSystemInfo (wxXmlNode *nodeSystemInfo)
| This function may be overridden to modify the contents of the system tag in the XML context file. More...

## Additional Inherited Members

Public Types inherited from wxDebugReport
enum | Context { Context_Current , Context_Exception }
| This enum is used for functions that report either the current state or the state during the last (fatal) exception. More...

## Constructor & Destructor Documentation

## ◆ wxDebugReportUpload()

wxDebugReportUpload::wxDebugReportUpload | ( | const wxString & | url,
|  | const wxString & | input,
|  | const wxString & | action,
|  | const wxString & | curl = `"curl"`
| ) |  |

This class will upload the compressed file created by its base class to an HTML multipart/form-data form at the specified address.

The url is the upload page address, input is the name of the `"type=file"` control on the form used for the file name and action is the value of the form action field. The report is uploaded using the curl program which should be available, the curl parameter may be used to specify the full path to it.

## Member Function Documentation

## ◆ OnServerReply()

virtual bool wxDebugReportUpload::OnServerReply | ( | const wxArrayString & | reply | ) |

protected virtual

This function may be overridden in a derived class to show the output from curl: this may be an HTML page or anything else that the server returned.

Value returned by this function becomes the return value of wxDebugReport::Process().