Blame docs/reference/html/GDataDownloadStream.html

Packit 4b6dd7
Packit 4b6dd7
<html>
Packit 4b6dd7
<head>
Packit 4b6dd7
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 4b6dd7
<title>GDataDownloadStream: GData Reference Manual</title>
Packit 4b6dd7
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit 4b6dd7
<link rel="home" href="index.html" title="GData Reference Manual">
Packit 4b6dd7
<link rel="up" href="ch02.html" title="Core API">
Packit 4b6dd7
<link rel="prev" href="GDataParsable.html" title="GDataParsable">
Packit 4b6dd7
<link rel="next" href="GDataUploadStream.html" title="GDataUploadStream">
Packit 4b6dd7
<meta name="generator" content="GTK-Doc V1.26.1 (XML mode)">
Packit 4b6dd7
<link rel="stylesheet" href="style.css" type="text/css">
Packit 4b6dd7
</head>
Packit 4b6dd7
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Top  | 
Packit 4b6dd7
                  Description  | 
Packit 4b6dd7
                  Object Hierarchy  | 
Packit 4b6dd7
                  Implemented Interfaces  | 
Packit 4b6dd7
                  Properties
Packit 4b6dd7
Packit 4b6dd7
Home
Packit 4b6dd7
Up
Packit 4b6dd7
Prev
Packit 4b6dd7
Next
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

GDataDownloadStream

Packit 4b6dd7

GDataDownloadStream — GData download stream object

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Stability Level

Packit 4b6dd7
Packit 4b6dd7
develop applications to these interfaces, release them, and have confidence that
Packit 4b6dd7
they will run on all minor releases of the product (after the one in which the
Packit 4b6dd7
interface was introduced, and within the same major release). Even at a major
Packit 4b6dd7
release, incompatible changes are expected to be rare, and to have strong
Packit 4b6dd7
justifications.
Packit 4b6dd7
">Stable, unless otherwise indicated
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Functions

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
GInputStream *
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gdata_download_stream_new ()
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
GDataService *
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gdata_download_stream_get_service ()
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
GDataAuthorizationDomain *
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gdata_download_stream_get_authorization_domain ()
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
GCancellable *
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gdata_download_stream_get_cancellable ()
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
const gchar *
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gdata_download_stream_get_download_uri ()
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
const gchar *
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gdata_download_stream_get_content_type ()
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gssize
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gdata_download_stream_get_content_length ()
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Properties

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
GDataAuthorizationDomain *
Packit 4b6dd7
authorization-domain
Packit 4b6dd7
Read / Write / Construct Only
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
GCancellable *
Packit 4b6dd7
cancellable
Packit 4b6dd7
Read / Write / Construct Only
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
glong
Packit 4b6dd7
content-length
Packit 4b6dd7
Read
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gchar *
Packit 4b6dd7
content-type
Packit 4b6dd7
Read
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
gchar *
Packit 4b6dd7
download-uri
Packit 4b6dd7
Read / Write / Construct Only
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
GDataService *
Packit 4b6dd7
service
Packit 4b6dd7
Read / Write / Construct Only
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Types and Values

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
 
Packit 4b6dd7
GDataDownloadStream
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
 
Packit 4b6dd7
GDataDownloadStreamClass
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Object Hierarchy

Packit 4b6dd7
    GObject
Packit 4b6dd7
    ╰── GInputStream
Packit 4b6dd7
        ╰── GDataDownloadStream
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Implemented Interfaces

Packit 4b6dd7

Packit 4b6dd7
GDataDownloadStream implements
Packit 4b6dd7
 GSeekable.

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Includes

Packit 4b6dd7
#include <gdata/gdata-download-stream.h>
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Description

Packit 4b6dd7

GDataDownloadStream is a GInputStream subclass to allow downloading of files from GData services with authorization from a GDataService under

Packit 4b6dd7
the given GDataAuthorizationDomain. If authorization is not required to perform the download, a GDataAuthorizationDomain doesn't have to be
Packit 4b6dd7
specified.

Packit 4b6dd7

Once a GDataDownloadStream is instantiated with gdata_download_stream_new(), the standard GInputStream API can be used on the stream to download

Packit 4b6dd7
the file. Network communication may not actually begin until the first call to g_input_stream_read(), so having a GDataDownloadStream around is no
Packit 4b6dd7
guarantee that the file is being downloaded.

Packit 4b6dd7

The content type and length of the file being downloaded are made available through “content-type” and

Packit 4b6dd7
“content-length” as soon as the appropriate data is received from the server. Connect to the
Packit 4b6dd7
“notify” content-type and content-length details to be notified as
Packit 4b6dd7
soon as the data is available.

Packit 4b6dd7

The entire download operation can be cancelled using the GCancellable instance provided to gdata_download_stream_new(), or returned by

Packit 4b6dd7
gdata_download_stream_get_cancellable(). Cancelling this at any time will cause all future GInputStream method calls to return
Packit 4b6dd7
G_IO_ERROR_CANCELLED. If any GInputStream methods are in the process of being called, they will be cancelled and return G_IO_ERROR_CANCELLED as
Packit 4b6dd7
soon as possible.

Packit 4b6dd7

Note that cancelling an individual method call (such as a call to g_input_stream_read()) using the GCancellable parameter of the method will not

Packit 4b6dd7
cancel the download as a whole — just that particular method call. In the case of g_input_stream_read(), this will cause it to successfully return
Packit 4b6dd7
any data that it has in memory at the moment (up to the requested number of bytes), or return a G_IO_ERROR_CANCELLED if it was blocking on receiving
Packit 4b6dd7
data from the network. This is also the behaviour of g_input_stream_read() when the download operation as a whole is cancelled.

Packit 4b6dd7

In the case of g_input_stream_close(), the call will return immediately if network activity hasn't yet started. If it has, the network activity will

Packit 4b6dd7
be cancelled, regardless of whether the call to g_input_stream_close() is cancelled. Cancelling a pending call to g_input_stream_close() (either
Packit 4b6dd7
using the method's GCancellable, or by cancelling the download stream as a whole) will cause it to stop waiting for the network activity to finish,
Packit 4b6dd7
and return G_IO_ERROR_CANCELLED immediately. Network activity will continue to be shut down in the background.

Packit 4b6dd7

If the server returns an error message (for example, if the user is not correctly authenticated/authorized or doesn't have suitable permissions to

Packit 4b6dd7
download from the given URI), it will be returned as a GDataServiceError by the first call to g_input_stream_read().

Packit 4b6dd7
Packit 4b6dd7

Example 2. Downloading to a File

Packit 4b6dd7
Packit 4b6dd7
  
Packit 4b6dd7
    
Packit 4b6dd7
      
Packit 4b6dd7
        
1
Packit 4b6dd7
2
Packit 4b6dd7
3
Packit 4b6dd7
4
Packit 4b6dd7
5
Packit 4b6dd7
6
Packit 4b6dd7
7
Packit 4b6dd7
8
Packit 4b6dd7
9
Packit 4b6dd7
10
Packit 4b6dd7
11
Packit 4b6dd7
12
Packit 4b6dd7
13
Packit 4b6dd7
14
Packit 4b6dd7
15
Packit 4b6dd7
16
Packit 4b6dd7
17
Packit 4b6dd7
18
Packit 4b6dd7
19
Packit 4b6dd7
20
Packit 4b6dd7
21
Packit 4b6dd7
22
Packit 4b6dd7
23
Packit 4b6dd7
24
Packit 4b6dd7
25
Packit 4b6dd7
26
Packit 4b6dd7
27
Packit 4b6dd7
28
Packit 4b6dd7
29
Packit 4b6dd7
30
Packit 4b6dd7
31
Packit 4b6dd7
32
Packit 4b6dd7
33
Packit 4b6dd7
34
Packit 4b6dd7
35
Packit 4b6dd7
36
Packit 4b6dd7
37
Packit 4b6dd7
        
GDataService *service;
Packit 4b6dd7
GDataAuthorizationDomain *domain;
Packit 4b6dd7
GCancellable *cancellable;
Packit 4b6dd7
GInputStream *download_stream;
Packit 4b6dd7
GOutputStream *output_stream;
Packit 4b6dd7
Packit 4b6dd7
/* Create the download stream */
Packit 4b6dd7
service = create_my_service ();
Packit 4b6dd7
domain = get_my_authorization_domain_from_service (service);
Packit 4b6dd7
cancellable = g_cancellable_new (); /* cancel this to cancel the entire download operation */
Packit 4b6dd7
download_stream = gdata_download_stream_new (service, domain, download_uri, cancellable);
Packit 4b6dd7
output_stream = create_file_and_return_output_stream ();
Packit 4b6dd7
Packit 4b6dd7
/* Perform the download asynchronously */
Packit 4b6dd7
g_output_stream_splice_async (output_stream, download_stream, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
Packit 4b6dd7
                              G_PRIORITY_DEFAULT, NULL, (GAsyncReadyCallback) download_splice_cb, NULL);
Packit 4b6dd7
Packit 4b6dd7
g_object_unref (output_stream);
Packit 4b6dd7
g_object_unref (download_stream);
Packit 4b6dd7
g_object_unref (cancellable);
Packit 4b6dd7
g_object_unref (domain);
Packit 4b6dd7
g_object_unref (service);
Packit 4b6dd7
Packit 4b6dd7
static void
Packit 4b6dd7
download_splice_cb (GOutputStream *output_stream, GAsyncResult *result, gpointer user_data)
Packit 4b6dd7
{
Packit 4b6dd7
    GError *error = NULL;
Packit 4b6dd7
Packit 4b6dd7
    g_output_stream_splice_finish (output_stream, result, &error);
Packit 4b6dd7
Packit 4b6dd7
    if (error != NULL && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) == FALSE)) {
Packit 4b6dd7
        /* Error downloading the file; potentially an I/O error (GIOError), or an error response from the server
Packit 4b6dd7
         * (GDataServiceError). You might want to delete the newly created file because of the error. */
Packit 4b6dd7
        g_error ("Error downloading file: %s", error->message);
Packit 4b6dd7
        g_error_free (error);
Packit 4b6dd7
    }
Packit 4b6dd7
}
Packit 4b6dd7
      
Packit 4b6dd7
    
Packit 4b6dd7
  
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Functions

Packit 4b6dd7
Packit 4b6dd7

gdata_download_stream_new ()

Packit 4b6dd7
GInputStream *
Packit 4b6dd7
gdata_download_stream_new (GDataService *service,
Packit 4b6dd7
                           GDataAuthorizationDomain *domain,
Packit 4b6dd7
                           const gchar *download_uri,
Packit 4b6dd7
                           GCancellable *cancellable);
Packit 4b6dd7

Creates a new GDataDownloadStream, allowing a file to be downloaded from a GData service using standard GInputStream API.

Packit 4b6dd7

As well as the standard GIO errors, calls to the GInputStream API on a GDataDownloadStream can also return any relevant specific error from

Packit 4b6dd7
GDataServiceError, or GDATA_SERVICE_ERROR_PROTOCOL_ERROR in the general case.

Packit 4b6dd7

If a GCancellable is provided in cancellable

Packit 4b6dd7
, the download operation may be cancelled at any time from another thread using g_cancellable_cancel().
Packit 4b6dd7
In this case, any ongoing network activity will be stopped, and any pending or future calls to GInputStream API on the GDataDownloadStream will
Packit 4b6dd7
return G_IO_ERROR_CANCELLED. Note that the GCancellable objects which can be passed to individual GInputStream operations will not cancel the
Packit 4b6dd7
download operation proper if cancelled — they will merely cancel that API call. The only way to cancel the download operation completely is using
Packit 4b6dd7
this cancellable
Packit 4b6dd7
.

Packit 4b6dd7
Packit 4b6dd7

Parameters

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

service

Packit 4b6dd7

a GDataService

Packit 4b6dd7
 
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

domain

Packit 4b6dd7

the GDataAuthorizationDomain to authorize the download, or NULL.

Packit 4b6dd7
[allow-none]
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

download_uri

Packit 4b6dd7

the URI to download; this must be HTTPS

Packit 4b6dd7
 
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

cancellable

Packit 4b6dd7

a GCancellable for the entire download stream, or NULL.

Packit 4b6dd7
[allow-none]
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Returns

Packit 4b6dd7

a new GInputStream, or NULL; unref with g_object_unref()

Packit 4b6dd7
Packit 4b6dd7

Since: 0.9.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

gdata_download_stream_get_service ()

Packit 4b6dd7
GDataService *
Packit 4b6dd7
gdata_download_stream_get_service (GDataDownloadStream *self);
Packit 4b6dd7

Gets the service used to authorize the download, as passed to gdata_download_stream_new().

Packit 4b6dd7
Packit 4b6dd7

Parameters

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

self

Packit 4b6dd7

a GDataDownloadStream

Packit 4b6dd7
 
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Returns

Packit 4b6dd7

the GDataService used to authorize the download.

Packit 4b6dd7

[transfer none]

Packit 4b6dd7
Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

gdata_download_stream_get_authorization_domain ()

Packit 4b6dd7
GDataAuthorizationDomain *
Packit 4b6dd7
gdata_download_stream_get_authorization_domain
Packit 4b6dd7
                               (GDataDownloadStream *self);
Packit 4b6dd7

Gets the authorization domain used to authorize the download, as passed to gdata_download_stream_new(). It may be NULL if authorization is not

Packit 4b6dd7
needed for the download.

Packit 4b6dd7
Packit 4b6dd7

Parameters

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

self

Packit 4b6dd7

a GDataDownloadStream

Packit 4b6dd7
 
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Returns

Packit 4b6dd7

the GDataAuthorizationDomain used to authorize the download, or NULL.

Packit 4b6dd7

[transfer none][allow-none]

Packit 4b6dd7
Packit 4b6dd7

Since: 0.9.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

gdata_download_stream_get_cancellable ()

Packit 4b6dd7
GCancellable *
Packit 4b6dd7
gdata_download_stream_get_cancellable (GDataDownloadStream *self);
Packit 4b6dd7

Gets the GCancellable for the entire download operation, “cancellable”.

Packit 4b6dd7
Packit 4b6dd7

Parameters

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

self

Packit 4b6dd7

a GDataDownloadStream

Packit 4b6dd7
 
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Returns

Packit 4b6dd7

the GCancellable for the entire download operation.

Packit 4b6dd7

[transfer none]

Packit 4b6dd7
Packit 4b6dd7

Since: 0.8.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

gdata_download_stream_get_download_uri ()

Packit 4b6dd7
const gchar *
Packit 4b6dd7
gdata_download_stream_get_download_uri
Packit 4b6dd7
                               (GDataDownloadStream *self);
Packit 4b6dd7

Gets the URI of the file being downloaded, as passed to gdata_download_stream_new().

Packit 4b6dd7
Packit 4b6dd7

Parameters

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

self

Packit 4b6dd7

a GDataDownloadStream

Packit 4b6dd7
 
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Returns

Packit 4b6dd7

the URI of the file being downloaded

Packit 4b6dd7
Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

gdata_download_stream_get_content_type ()

Packit 4b6dd7
const gchar *
Packit 4b6dd7
gdata_download_stream_get_content_type
Packit 4b6dd7
                               (GDataDownloadStream *self);
Packit 4b6dd7

Gets the content type of the file being downloaded. If the Content-Type header has not yet

Packit 4b6dd7
been received, NULL will be returned.

Packit 4b6dd7
Packit 4b6dd7

Parameters

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

self

Packit 4b6dd7

a GDataDownloadStream

Packit 4b6dd7
 
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Returns

Packit 4b6dd7

the content type of the file being downloaded, or NULL

Packit 4b6dd7
Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

gdata_download_stream_get_content_length ()

Packit 4b6dd7
gssize
Packit 4b6dd7
gdata_download_stream_get_content_length
Packit 4b6dd7
                               (GDataDownloadStream *self);
Packit 4b6dd7

Gets the length (in bytes) of the file being downloaded. If the Content-Length header has not yet

Packit 4b6dd7
been received from the server, -1 will be returned.

Packit 4b6dd7
Packit 4b6dd7

Parameters

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

self

Packit 4b6dd7

a GDataDownloadStream

Packit 4b6dd7
 
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Returns

Packit 4b6dd7

the content length of the file being downloaded, or -1

Packit 4b6dd7
Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Types and Values

Packit 4b6dd7
Packit 4b6dd7

GDataDownloadStream

Packit 4b6dd7
typedef struct _GDataDownloadStream GDataDownloadStream;
Packit 4b6dd7

All the fields in the GDataDownloadStream structure are private and should never be accessed directly.

Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

GDataDownloadStreamClass

Packit 4b6dd7
typedef struct {
Packit 4b6dd7
} GDataDownloadStreamClass;
Packit 4b6dd7
Packit 4b6dd7

All the fields in the GDataDownloadStreamClass structure are private and should never be accessed directly.

Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Property Details

Packit 4b6dd7
Packit 4b6dd7

The “authorization-domain” property

Packit 4b6dd7
  “authorization-domain”     GDataAuthorizationDomain *
Packit 4b6dd7

The authorization domain for the download, against which the “authorizer” for the “service” should be

Packit 4b6dd7
authorized. This may be NULL if authorization is not needed for the download.

Packit 4b6dd7

Flags: Read / Write / Construct Only

Packit 4b6dd7

Since: 0.9.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

The “cancellable” property

Packit 4b6dd7
  “cancellable”              GCancellable *
Packit 4b6dd7

An optional cancellable used to cancel the entire download operation. If a GCancellable instance isn't provided for this property at

Packit 4b6dd7
construction time (i.e. to gdata_download_stream_new()), one will be created internally and can be retrieved using
Packit 4b6dd7
gdata_download_stream_get_cancellable() and used to cancel the download operation with g_cancellable_cancel() just as if it was passed to
Packit 4b6dd7
gdata_download_stream_new().

Packit 4b6dd7

If the download operation is cancelled using this GCancellable, any ongoing network activity will be stopped, and any pending or future

Packit 4b6dd7
calls to GInputStream API on the GDataDownloadStream will return G_IO_ERROR_CANCELLED. Note that the GCancellable objects which can be
Packit 4b6dd7
passed to individual GInputStream operations will not cancel the download operation proper if cancelled — they will merely cancel that API
Packit 4b6dd7
call. The only way to cancel the download operation completely is using “cancellable”.

Packit 4b6dd7

Flags: Read / Write / Construct Only

Packit 4b6dd7

Since: 0.8.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

The “content-length” property

Packit 4b6dd7
  “content-length”           glong
Packit 4b6dd7

The length (in bytes) of the file being downloaded. This will initially be -1, and will be populated as soon as

Packit 4b6dd7
the appropriate header is received from the server. Its value will never change after this.

Packit 4b6dd7

Note that change notifications for this property (“notify” emissions) may be emitted in threads other than the one which created

Packit 4b6dd7
the GDataDownloadStream. It is the client's responsibility to ensure that any notification signal handlers are either multi-thread safe
Packit 4b6dd7
or marshal the notification to the thread which owns the GDataDownloadStream as appropriate.

Packit 4b6dd7

Flags: Read

Packit 4b6dd7

Allowed values: >= -1

Packit 4b6dd7

Default value: -1

Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

The “content-type” property

Packit 4b6dd7
  “content-type”             gchar *
Packit 4b6dd7

The content type of the file being downloaded. This will initially be NULL, and will be populated as soon as the appropriate header is

Packit 4b6dd7
received from the server. Its value will never change after this.

Packit 4b6dd7

Note that change notifications for this property (“notify” emissions) may be emitted in threads other than the one which created

Packit 4b6dd7
the GDataDownloadStream. It is the client's responsibility to ensure that any notification signal handlers are either multi-thread safe
Packit 4b6dd7
or marshal the notification to the thread which owns the GDataDownloadStream as appropriate.

Packit 4b6dd7

Flags: Read

Packit 4b6dd7

Default value: NULL

Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

The “download-uri” property

Packit 4b6dd7
  “download-uri”             gchar *
Packit 4b6dd7

The URI of the file to download. This must be HTTPS.

Packit 4b6dd7

Flags: Read / Write / Construct Only

Packit 4b6dd7

Default value: NULL

Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7

Packit 4b6dd7
Packit 4b6dd7

The “service” property

Packit 4b6dd7
  “service”                  GDataService *
Packit 4b6dd7

The service which is used to authorize the download, and to which the download relates.

Packit 4b6dd7

Flags: Read / Write / Construct Only

Packit 4b6dd7

Since: 0.5.0

Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7
Packit 4b6dd7

Generated by GTK-Doc V1.26.1
Packit 4b6dd7
</body>
Packit 4b6dd7
</html>