FileTransfer Class Reference

`#include <jinglefiletransfer.h>`

Inheritance diagram for FileTransfer:
[legend]

## Classes

struct | File

## Public Types

enum | Type { Offer , Request , Checksum , Abort , Received , Invalid }
typedef std::list< File > | FileList

## Public Member Functions

| FileTransfer (Type type, const FileList &files)
| FileTransfer (const Tag *tag=0)
virtual | ~FileTransfer ()
Type | type () const
const FileList & | files () const
virtual const StringList | features () const
virtual const std::string & | filterString () const
virtual Tag * | tag () const
virtual Plugin * | newInstance (const Tag *tag) const
virtual Plugin * | clone () const
Public Member Functions inherited from Plugin
| Plugin (JinglePluginType type)
virtual | ~Plugin ()
void | addPlugin (const Plugin *plugin)
const Plugin * | findPlugin (int type) const
template<class T>
const T * | findPlugin (int type) const
const PluginList & | plugins () 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

## FileList

typedef std::list<File> FileList

A list of file information structs.

Definition at line 70 of file jinglefiletransfer.h.

## Member Enumeration Documentation

## Type

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() [1/2]

FileTransfer | ( | Type | type,
|  | const FileList & | files )

Creates a new instance.

Parameters

  type | The type of the object.
  files | A 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() [2/2]

FileTransfer | ( | const Tag * | tag = 0 | ) |

Creates a new instance from the given Tag

Parameters

  tag | The Tag to parse.

Definition at line 41 of file jinglefiletransfer.cpp.

## ~FileTransfer()

virtual ~FileTransfer | ( |  | ) |

inline virtual

Virtual destructor.

Definition at line 89 of file jinglefiletransfer.h.

## Member Function Documentation

## clone()

virtual Plugin * clone | ( |  | ) | const

inline virtual

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.

## features()

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.

## files()

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.

## filterString()

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.

## newInstance()

Plugin * newInstance | ( | const Tag * | tag | ) | const

virtual

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

Parameters

  tag | The 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 * 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 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:

- jinglefiletransfer.h
- jinglefiletransfer.cpp