Ubuntu.Content ContentTransfer

Represents a transfer of content between two ContentPeers

Import Statement: import Ubuntu.Content 1.1



Detailed Description

See documentation for ContentHub

Property Documentation

contentType : ContentType

Specifies the ContentType requested.

destination : QString

Provides the app id of the destination application for this transfer

direction : ContentTransfer.Direction

ContentTransfer::direction indicates if this transferobject is used for import or export transaction

:ref:`ContentTransfer <sdk_ubuntu_content_contenttransfer>`.Direction is an enumeration: Direction Description ContentTransfer.Import Transfer is a request to import content. ContentTransfer.Export Transfer is a request to export content. ContentTransfer.Share Transfer is a request to share content.

downloadId : string

The Download Manager ID of a SingleDownload, which will then be transfered to the selected peer.

items : list<ContentItem>

List of items included in the ContentTransfer

selectionType : ContentTransfer.SelectionType

ContentTransfer::selectionType indicates if this transfer object allows single or multiple selection of items

:ref:`ContentTransfer <sdk_ubuntu_content_contenttransfer>`.SelectionType is an enumeration: Type Description ContentTransfer.Single Transfer should contain a single item. ContentTransfer.Multiple Transfer can contain multiple items.

source : QString

Provides the app id of the source application for this transfer

state : ContentTransfer.State

:ref:`ContentTransfer <sdk_ubuntu_content_contenttransfer>`.State is an enumeration: State Description ContentTransfer.Created Transfer created, waiting to be initiated. ContentTransfer.Initiated Transfer has been initiated. ContentTransfer.InProgress Transfer is in progress. ContentTransfer.Downloading Transfer is downloading item specified by downloadId. ContentTransfer.Downloaded Download specified by downloadId has completed. ContentTransfer.Charged Transfer is charged with items and ready to be collected. ContentTransfer.Collected Items in the transfer have been collected. ContentTransfer.Aborted Transfer has been aborted. ContentTransfer.Finalized Transfer has been finished and cleaned up.

store : string

ContentStore where the ContentTransfer will add items

Method Documentation


Sets State to ContentTransfer.Finalized and cleans up temporary files


Start the transfer, this sets the State to ContentTransfer.Initiated