RequestProgressDialog Class Reference

Dialog to perform an internet request and display a rotating progress of it. More...

#include <RequestProgressDlg.h>

Inherits ADMBaseDialog, and ProgressInterface.

Collaboration diagram for RequestProgressDialog:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RequestProgressDialog ()
 Default constructor: initializes members.
bool DoRequest (InternetRequest &request, const std::string &sRequest, LPCTSTR lpServer=NULL, LPCTSTR lpOptional=NULL, LPCTSTR lpHeaders=NULL)
 Shows the dialog and runs the request in a worker thread.
virtual bool GetCancel ()
 Called to test if the operation is to be canceled.
virtual void OnFinished (bool bSuccess)
 Called when the operation is finished.
virtual void OnBtnClicked (ASInt32 nID)
 Called when a notify button is clicked.

Public Attributes

InternetRequestBuffer m_buffer
 Buffer to fill with the request results.
bool m_bSuccess
 true if the request succeeded, false if failed

Protected Member Functions

virtual ASErr OnInitDialog ()
 Called when the dialog is initialized.
virtual ASBoolean OnTimer (ADMTimerRef inTimerID)
 Called when the timer is raised.

Protected Attributes

bool m_bCancel
 true to cancel the request
ADMMoveProgress m_progress
 Rotating progress control.

Detailed Description

Dialog to perform an internet request and display a rotating progress of it.

Definition at line 75 of file RequestProgressDlg.h.


Member Function Documentation

bool RequestProgressDialog::DoRequest ( InternetRequest request,
const std::string &  sRequest,
LPCTSTR  lpServer = NULL,
LPCTSTR  lpOptional = NULL,
LPCTSTR  lpHeaders = NULL 
)

Shows the dialog and runs the request in a worker thread.

Parameters:
request The request object to use
sRequest The request to perform
lpServer Name of server to query (can be NULL)
lpOptional Additional data for POST (can be NULL)
lpHeaders Additional headers (can be NULL)
Returns:

Definition at line 85 of file RequestProgressDlg.cpp.

References ADMBaseDialog::DoModal(), InternetRequest::DoRequestThread(), m_bCancel, m_bSuccess, and m_buffer.

Referenced by CCInfoFullPlugin::RetrieveCCInfo().

virtual bool RequestProgressDialog::GetCancel (  )  [inline, virtual]

Called to test if the operation is to be canceled.

Returns:
true to cancel the operation, false to continue (default)

Reimplemented from ProgressInterface.

Definition at line 107 of file RequestProgressDlg.h.

References m_bCancel.

Referenced by CCInfoFullPlugin::RetrieveCCInfo().

void RequestProgressDialog::OnBtnClicked ( ASInt32  nID  )  [virtual]

Called when a notify button is clicked.

Parameters:
nID ID of button clicked

Reimplemented from ADMBaseDialog.

Definition at line 126 of file RequestProgressDlg.cpp.

References ADMBaseDialog::EnableControl(), m_bCancel, and ADMBaseDialog::SetControlText().

virtual void RequestProgressDialog::OnFinished ( bool  bSuccess  )  [inline, virtual]

Called when the operation is finished.

Parameters:
bSuccess true if finished successfully, false if failed (or canceled by the user)

Reimplemented from ProgressInterface.

Definition at line 112 of file RequestProgressDlg.h.

References ADMBaseDialog::EndModal(), and m_bSuccess.

ASErr RequestProgressDialog::OnInitDialog (  )  [protected, virtual]

Called when the dialog is initialized.

Returns:
kNoErr if all went well, any other error code if failed

Reimplemented from ADMBaseDialog.

Definition at line 103 of file RequestProgressDlg.cpp.

References ADMBaseDialog::AddNotifyBtn(), ADMBaseDialog::ConnectControl(), ADMBaseDialog::CreateADMTimer(), and m_progress.

ASBoolean RequestProgressDialog::OnTimer ( ADMTimerRef  inTimerID  )  [protected, virtual]

Called when the timer is raised.

Parameters:
inTimerID ADM timer object
Returns:
true (to continue receiving timer notifications)

Reimplemented from ADMBaseDialog.

Definition at line 147 of file RequestProgressDlg.cpp.

References m_progress, and ADMMoveProgress::Step().


The documentation for this class was generated from the following files:

Generated on Thu Dec 17 17:37:11 2009 for CCInfo PDF Plugin by doxygen 1.6.1