Logo Search packages:      
Sourcecode: kmess version File versions  Download package

PictureTransferP2P Class Reference

#include <picturetransferp2p.h>

Inheritance diagram for PictureTransferP2P:

P2PApplication Application

List of all members.


Detailed Description

An application class responsable for picture transfers between clients.

Author:
Diederik van der Boor

Definition at line 37 of file picturetransferp2p.h.


Public Types

enum  ApplicationMode { APP_MODE_NORMAL, APP_MODE_BACKGROUND, APP_MODE_ERROR_HANDLER }

Signals

void appInitMessage (QString html)
void appMessage (QString html)
void deleteMe (Application *object)
void fileTransferred (QString filename)
void pictureReceived (const QString &contact, const QString &msnObject)
void putMsg (const MimeMessage &message)
void systemMessage (QString message)

Public Member Functions

QString getBranch () const
QString getCallID () const
QString getContactHandle () const
const QString & getCookie () const
unsigned long getLastContactAckMessageID () const
unsigned long getLastContactMessageID () const
unsigned long getLastUserMessageID () const
unsigned long getLastUserUniqueID () const
int getMode () const
QString getMsnObject () const
unsigned long getSessionID () const
void gotCommand (QString command)
void gotMessage (const MimeMessage &message)
 PictureTransferP2P (const QString &localIP, const QString &contactHandle, const QString &msnObject)
 PictureTransferP2P (const QString &localIP, const QString &contactHandle)
void setMode (ApplicationMode mode)
void start ()
virtual void userAborted ()
virtual ~PictureTransferP2P ()

Static Public Member Functions

static QString getAppId ()
static QString getPictureFileName (const MsnObject &msnObject)

Protected Types

enum  ApplicationCancelReason {
  CANCEL_INVITATION, CANCEL_SESSION, CANCEL_NOT_INSTALLED, CANCEL_TIMEOUT,
  CANCEL_FAILED, CANCEL_INVALID_SLP_CONTENT_TYPE
}
enum  P2PDataType { P2P_TYPE_NEGOTIATION = 0, P2P_TYPE_PICTURE = 1, P2P_TYPE_FILE = 2 }

Protected Member Functions

void acknowledgePreparation (bool ack=true)
void contactAborted (const QString &message=0)
void contactRejected (const QString &message=0)
void endApplication (const QString &reason=0)
QString generateCookie () const
virtual QString getCancelMessage () const
const QString & getExternalIp () const
const QString & getInvitationContentType () const
unsigned long getInvitationSessionID () const
const QString & getLocalIp () const
bool isUserStartedApp () const
bool isWaitingForUser () const
void offerAcceptOrReject (const QString &appHtml)
void offerCancel (const QString &appHtml)
void sendCancelMessage (const ApplicationCancelReason cancelReason)
void sendData (QIODevice *dataSource, const P2PDataType type)
void sendDataPreparation ()
void sendDataPreparationAck ()
void sendSlpInvitation (uint sessionID, const QString &contentType, const MimeMessage &message)
void sendSlpOkMessage (const MimeMessage &message)
void startByInvite (const QString &invitationCookie)
void userRejected ()

Static Protected Member Functions

static void freePort (const int &port)
static unsigned long generateID ()

Private Member Functions

void contactStarted1_ContactInvitesUser (const MimeMessage &message)
void contactStarted2_UserAccepts ()
void contactStarted3_ContactConfirmsAccept (const MimeMessage &message)
void contactStarted4_ContactConfirmsPreparation ()
void gotData (const P2PMessage &message)
void userStarted1_UserInvitesContact ()
void userStarted2_ContactAccepts (const MimeMessage &message)
void userStarted3_UserPrepares ()

Private Attributes

QFile * file_
QString fileName_
QString msnObject_

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

Generated by  Doxygen 1.6.0   Back to index