wxFlickrAPI.wxFlickrClient Class Reference

The almighty client object that does all the communication with flickr. More...

#include <wxFlickrClient.h>

Inheritance diagram for wxFlickrAPI.wxFlickrClient:

wxFlickrAPI.wxFlickrClientREST wxFlickrAPI.wxFlickrClientXMLRPC List of all members.

Public Member Functions

 wxFlickrClient (wxString sAPIKey, wxString sSharedSecret)
 Create a wxFlickrClient object using a given flickr API key and shared secret.
virtual ~wxFlickrClient ()
 Appetite for destruction.
void SetSocketEventHandler (wxEvtHandler &handler, int iId=-1, bool bDeleteOnDestruction=FALSE)
 Set the event handler for socket events.
AuthDataGetAuthData ()
 Get the current authentication data.
wxString GetAPIKey ()
 Get the API key.
void SetAuthData (AuthData *pData, bool bCopy=FALSE)
 Set all authentication data.
void SetFlickrHandler (wxEvtHandler *pFlHandler)
 Set the handler for wxFlickrEvent instances.
bool IsReady ()
 Check if the client is ready.
bool IsSignedIn ()
 Check if this client is signed in.
void ForwardFlickrResponse (TiXmlNode *pFlickrTree, bool bIsErrorMsg)
 Forward a flickr.com response (from the socket event handler) to the current method object (m_pCurrentMethod).

Protected Member Functions

virtual bool Connect (bool bWait=TRUE)
 Connect to flickr.com (same as calling Connect(m_FlickrURL, bWait) as inherited from wxSocketClient.
void SetCurrentMethod (wxFlickrAPIMethod *pMethod)
 Set the api method to use.
virtual void Send2Flickr (wxString sMethod, StrStrHashMap args, wxFlickrAPIMethod *pSender=NULL, bool bSigned=FALSE)=0
void UploadPhoto (wxString sImage, StrStrHashMap args, wxFlickrAPIMethod *pSender)
wxString BuildSignature (wxArrayString aSortedArgs)
 Build signature from an alphabetically sorted list of arguments (using the MD5 sum).
wxEvtHandler * GetFlickrHandler ()
 Get the current handler for wxFlickrEvent instances.
void SendWhileNotReadyErr (wxString sFullMethodName)

Protected Attributes

wxEvtHandler * m_pFlHandler
 The handler for wxFlickrEvent instances that were generated here.
wxFlickrAPIMethodm_pCurrentMethod
 The flickr API method currently being executed.
wxString m_sAPIKey
 The API key of this app.
wxString m_sSharedSecret
 The shared secret belonging to the API key.
wxIPV4address m_FlickrURL
 The URL of flickr.com.
AuthDatam_pAuthData
 Some authentication data (auth_token).

Friends

class wxFlickrAPIMethod
class Upload

Detailed Description

The almighty client object that does all the communication with flickr.

Itself is abstract. Its concrete subclasses can speak REST, XML-RPC and SOAP.


Constructor & Destructor Documentation

wxFlickrClient::wxFlickrClient wxString  sAPIKey,
wxString  sSharedSecret
 

Create a wxFlickrClient object using a given flickr API key and shared secret.

Parameters:
sAPIKey The flickr API key of your application.
sSharedSecret The corresponding shared secret.


Member Function Documentation

wxString wxFlickrClient::BuildSignature wxArrayString  aSortedArgs  )  [protected]
 

Build signature from an alphabetically sorted list of arguments (using the MD5 sum).

Parameters:
aSortedArgs An alphabetically sorted list of arguments.

void wxFlickrClient::ForwardFlickrResponse TiXmlNode *  pFlickrTree,
bool  bIsErrorMsg
 

Forward a flickr.com response (from the socket event handler) to the current method object (m_pCurrentMethod).

Parameters:
pFlickrTree Some XML data as returned by flickr. Only XML payload, no ommunication specific nodes (REST,XML-RPC,SOAP) should be inside.

AuthData * wxFlickrClient::GetAuthData  ) 
 

Get the current authentication data.

Returns:
Some authentication data or NULL if none is present.

wxEvtHandler * wxFlickrClient::GetFlickrHandler  )  [protected]
 

Get the current handler for wxFlickrEvent instances.

Returns:
The current handler for wxFlickrEvent instances.

bool wxFlickrClient::IsReady  ) 
 

Check if the client is ready.

Always check this before calling API methods or deleting API objects.

Returns:
TRUE if the client is ready.

bool wxFlickrClient::IsSignedIn  ) 
 

Check if this client is signed in.

Returns:
TRUE if this client is signed in.

void wxFlickrClient::SetAuthData AuthData pData,
bool  bCopy = FALSE
 

Set all authentication data.

Note that the given pData pointer will be stored here and deleted upon destruction, unless bCopy is set true, then a deep copy of the AuthData will be stored here.

Parameters:
pData A pointer to some auth information.
pCopy TRUE if pData should not directly be stored here but copied.

void wxFlickrClient::SetCurrentMethod wxFlickrAPIMethod pMethod  )  [protected]
 

Set the api method to use.

This has to be set before calling Send2Flickr.

Parameters:
pMethod An API method.

void wxFlickrClient::SetFlickrHandler wxEvtHandler *  pFlHandler  ) 
 

Set the handler for wxFlickrEvent instances.

Parameters:
pFlHandler A handler for wxFlickrEvent instances.

void wxFlickrClient::SetSocketEventHandler wxEvtHandler &  handler,
int  iId = -1,
bool  bDeleteOnDestruction = FALSE
 

Set the event handler for socket events.

Implicitly calls SetEventHandler of wxSocketBase.

Parameters:
handler The event handler to use.
iId The id of socket event.
bDeleteOnDestruction Set to TRUE if this wxFlickrClient object shall care for deletion of the event handler object when it is destroyed.


The documentation for this class was generated from the following files:
Generated on Mon Feb 20 11:06:42 2006 for wxFlickr by  doxygen 1.4.6-NO