gloox  1.0.16
Classes | Public Types | Public Member Functions | List of all members
FileTransfer Class Reference

#include <jinglefiletransfer.h>

Inheritance diagram for FileTransfer:
Inheritance graph
[legend]

Classes

struct  File
 

Public Types

enum  Type {
  Offer, Request, Checksum, Abort,
  Received, Invalid
}
 
typedef std::list< FileFileList
 

Public Member Functions

 FileTransfer (Type type, const FileList &files)
 
 FileTransfer (const Tag *tag=0)
 
virtual ~FileTransfer ()
 
Type type () const
 
const FileListfiles () const
 
virtual const StringList features () const
 
virtual const std::string & filterString () const
 
virtual Tagtag () const
 
virtual PluginnewInstance (const Tag *tag) const
 
virtual Pluginclone () const
 
- Public Member Functions inherited from Plugin
 Plugin (JinglePluginType type)
 
virtual ~Plugin ()
 
void addPlugin (const Plugin *plugin)
 
const PluginfindPlugin (int type) const
 
template<class T >
const T * findPlugin (int type) const
 
const PluginListplugins () const
 
JinglePluginType pluginType () const
 

Detailed Description

An abstraction of the signaling part of Jingle File Transfer (XEP-0234), implemented as a Jingle::Plugin.

XEP Version: 0.15

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0.7

Definition at line 37 of file jinglefiletransfer.h.

Member Typedef Documentation

typedef std::list<File> FileList

A list of file information structs.

Definition at line 70 of file jinglefiletransfer.h.

Member Enumeration Documentation

enum Type

The type of a FileTransfer instance.

Enumerator
Offer 

Signifies a file transfer offer (send).

Request 

Signifies a file request (pull).

Checksum 

Used to send a file's checksum.

Abort 

used to abort a running transfer.

Received 

Signifies a successful file transfer.

Invalid 

Invalid type.

Definition at line 44 of file jinglefiletransfer.h.

Constructor & Destructor Documentation

FileTransfer ( Type  type,
const FileList files 
)

Creates a new instance.

Parameters
typeThe type of the object.
filesA list of files to offer, request, acknowledge, ... Most of the time this list will contain only one file.

Definition at line 36 of file jinglefiletransfer.cpp.

FileTransfer ( const Tag tag = 0)

Creates a new instance from the given Tag

Parameters
tagThe Tag to parse.

Definition at line 41 of file jinglefiletransfer.cpp.

virtual ~FileTransfer ( )
inlinevirtual

Virtual destructor.

Definition at line 89 of file jinglefiletransfer.h.

Member Function Documentation

virtual Plugin* clone ( ) const
inlinevirtual

Creates an identical deep copy of the current instance.

Returns
An identical deep copy of the current instance.

Implements Plugin.

Definition at line 116 of file jinglefiletransfer.h.

const StringList features ( ) const
virtual

Reimplement this function if your plugin wants to add anything to the list of features announced via Disco.

Returns
A list of additional feature strings.

Reimplemented from Plugin.

Definition at line 95 of file jinglefiletransfer.cpp.

const FileList& files ( ) const
inline

Returns a list of embedded file infos.

Returns
A list of embedded file infos.

Definition at line 101 of file jinglefiletransfer.h.

const std::string & filterString ( ) const
virtual

Returns an XPath expression that describes a path to child elements of a jingle element that the plugin handles. The result should be a single Tag.

Returns
The plugin's filter string.

Implements Plugin.

Definition at line 102 of file jinglefiletransfer.cpp.

Plugin * newInstance ( const Tag tag) const
virtual

Returns a new instance of the same plugin type, based on the Tag provided.

Parameters
tagThe Tag to parse and create a new instance from.
Returns
The new plugin instance.

Implements Plugin.

Definition at line 111 of file jinglefiletransfer.cpp.

Tag * tag ( ) const
virtual

Returns a Tag representation of the plugin.

Returns
A Tag representation of the plugin.

Implements Plugin.

Definition at line 116 of file jinglefiletransfer.cpp.

Type type ( ) const
inline

Returns the type.

Returns
The type.

Definition at line 95 of file jinglefiletransfer.h.


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