EDataCapture

EDataCapture — Capture data from streams

Synopsis

#include <e-util/e-util.h>

struct              EDataCapture;
EDataCapture *      e_data_capture_new                  (GMainContext *main_context);
GMainContext *      e_data_capture_ref_main_context     (EDataCapture *data_capture);

Object Hierarchy

  GObject
   +----EDataCapture

Implemented Interfaces

EDataCapture implements GConverter.

Properties

  "main-context"             GMainContext*         : Read / Write / Construct Only

Signals

  "finished"                                       : Run First

Description

EDataCapture is a GConverter that captures data until the end of the input data is seen, then emits a "finished" signal with the captured data in a GBytes instance.

When used with GConverterInputStream or GConverterOutputStream, an EDataCapture can discreetly capture the stream content for the purpose of caching.

Details

struct EDataCapture

struct EDataCapture;

Contains only private data that should be read and manipulated using the functions below.


e_data_capture_new ()

EDataCapture *      e_data_capture_new                  (GMainContext *main_context);

Creates a new EDataCapture. If main_context is NULL, then the "finished" signal will be emitted from the thread-default GMainContext for this thread.

main_context :

a GMainContext, or NULL

Returns :

an EDataCapture

e_data_capture_ref_main_context ()

GMainContext *      e_data_capture_ref_main_context     (EDataCapture *data_capture);

Returns the GMainContext from which the "finished" signal is emitted.

The returned GMainContext is referenced for thread-safety and must be unreferenced with g_main_context_unref() when finished with it.

data_capture :

an EDataCapture

Returns :

a GMainContext

Property Details

The "main-context" property

  "main-context"             GMainContext*         : Read / Write / Construct Only

The GMainContext from which to emit the "finished" signal.

Signal Details

The "finished" signal

void                user_function                      (EDataCapture *data_capture,
                                                        GBytes       *data,
                                                        gpointer      user_data)         : Run First

The ::finished signal is emitted when there is no more input data to be captured.

data_capture :

the EDataCapture that received the signal

data :

the captured data

user_data :

user data set when the signal handler was connected.