TpBaseCallContent

TpBaseCallContent — base class for TpSvcCallContent implementations

Functions

Properties

TpBaseConnection * connection Read / Write / Construct Only
guint creator Read / Write / Construct Only
gboolean currently-sending-tones Read
gchar * deferred-tones Read
guint disposition Read / Write / Construct Only
GStrv interfaces Read
guint media-type Read / Write / Construct Only
gchar * name Read / Write / Construct Only
gchar * object-path Read / Write / Construct Only
GPtrArray_DBusGObjectPath_ * streams Read

Types and Values

Object Hierarchy

    GObject
    ╰── TpBaseCallContent
        ╰── TpBaseMediaCallContent

Implemented Interfaces

TpBaseCallContent implements TpSvcDBusProperties, TpSvcCallContent and TpSvcCallContentInterfaceDTMF.

Includes

#include <telepathy-glib/telepathy-glib.h>

Description

This base class makes it easier to write TpSvcCallContent implementations by implementing its properties, and some of its methods.

Subclasses should fill in TpBaseCallContentClass.get_interfaces, and TpBaseCallContentClass.deinit virtual function.

Functions

TpBaseCallContentGetInterfacesFunc ()

GPtrArray *
(*TpBaseCallContentGetInterfacesFunc) (TpBaseCallContent *self);

Signature of an implementation of TpBaseCallContentClass.get_interfaces.

Parameters

self

a TpBaseCallContent

 

Returns

a GPtrArray containing static strings.

Since: 0.17.5


TpBaseCallContentDeinitFunc ()

void
(*TpBaseCallContentDeinitFunc) (TpBaseCallContent *self);

Signature of an implementation of TpBaseCallContentClass.deinit.

Parameters

self

a TpBaseCallContent

 

Since: 0.17.5


TpBaseCallContentMultipleTonesFunc ()

gboolean
(*TpBaseCallContentMultipleTonesFunc) (TpBaseCallContent *self,
                                       const gchar *tones,
                                       GError **error);

Signature of an implementation of TpBaseCallContentClass.multiple_tones.

Parameters

self

a TpBaseCallContent

 

tones

a string representation of one or more DTMF events

 

error

a GError to fill

 

Returns

TRUE on success, otherwise FALSE and set error

Since: 0.17.5


TpBaseCallContentStartToneFunc ()

gboolean
(*TpBaseCallContentStartToneFunc) (TpBaseCallContent *self,
                                   TpDTMFEvent event,
                                   GError **error);

Signature of an implementation of TpBaseCallContentClass.start_tone.

Parameters

self

a TpBaseCallContent

 

event

a TpDTMFEvent

 

error

a GError to fill

 

Returns

TRUE on success, otherwise FALSE and set error

Since: 0.17.5


TpBaseCallContentStopToneFunc ()

gboolean
(*TpBaseCallContentStopToneFunc) (TpBaseCallContent *self,
                                  GError **error);

Signature of an implementation of TpBaseCallContentClass.stop_tone.

Parameters

self

a TpBaseCallContent

 

error

a GError to fill

 

Returns

TRUE on success, otherwise FALSE and set error

Since: 0.17.5


tp_base_call_content_get_connection ()

TpBaseConnection *
tp_base_call_content_get_connection (TpBaseCallContent *self);

Parameters

self

a TpBaseCallContent

 

Returns

the value of “connection”

Since: 0.17.5


tp_base_call_content_get_object_path ()

const gchar *
tp_base_call_content_get_object_path (TpBaseCallContent *self);

Parameters

self

a TpBaseCallContent

 

Returns

the value of “object-path”

Since: 0.17.5


tp_base_call_content_get_name ()

const gchar *
tp_base_call_content_get_name (TpBaseCallContent *self);

Parameters

self

a TpBaseCallContent

 

Returns

the value of “name”

Since: 0.17.5


tp_base_call_content_get_media_type ()

TpMediaStreamType
tp_base_call_content_get_media_type (TpBaseCallContent *self);

Parameters

self

a TpBaseCallContent

 

Returns

the value of “media-type”

Since: 0.17.5


tp_base_call_content_get_disposition ()

TpCallContentDisposition
tp_base_call_content_get_disposition (TpBaseCallContent *self);

Parameters

self

a TpBaseCallContent

 

Returns

the value of “disposition”

Since: 0.17.5


tp_base_call_content_get_streams ()

GList *
tp_base_call_content_get_streams (TpBaseCallContent *self);

Parameters

self

a TpBaseCallContent

 

Returns

a GList of TpBaseCallStream of this content.

Since: 0.17.5


tp_base_call_content_add_stream ()

void
tp_base_call_content_add_stream (TpBaseCallContent *self,
                                 TpBaseCallStream *stream);

Add stream to self 's “streams”. Emitting StreamsAdded DBus signal.

Parameters

self

a TpBaseCallContent

 

stream

a TpBaseCallStream

 

Since: 0.17.5


tp_base_call_content_remove_stream ()

void
tp_base_call_content_remove_stream (TpBaseCallContent *self,
                                    TpBaseCallStream *stream,
                                    TpHandle actor_handle,
                                    TpCallStateChangeReason reason,
                                    const gchar *dbus_reason,
                                    const gchar *message);

Remove stream from self 's “streams”. Emitting StreamsRemoved DBus signal.

Parameters

self

a TpBaseCallContent

 

stream

a TpBaseCallStream

 

actor_handle

the contact responsible for the change, or 0 if no contact was responsible.

 

reason

the TpCallStateChangeReason of the change

 

dbus_reason

a specific reason for the change, which may be a D-Bus error in the Telepathy namespace, a D-Bus error in any other namespace (for implementation-specific errors), or the empty string to indicate that the state change was not an error.

 

message

an optional debug message, to expediate debugging the potentially many processes involved in a call.

 

Since: 0.17.5

Types and Values

struct TpBaseCallContent

struct TpBaseCallContent;

A base class for call content implementations

Since: 0.17.5


struct TpBaseCallContentClass

struct TpBaseCallContentClass {
  TpBaseCallContentDeinitFunc deinit;
  TpBaseCallContentGetInterfacesFunc get_interfaces;

  TpBaseCallContentStartToneFunc start_tone;
  TpBaseCallContentStopToneFunc stop_tone;
  TpBaseCallContentMultipleTonesFunc multiple_tones;
};

The class structure for TpBaseCallContent

Members

TpBaseCallContentDeinitFunc deinit;

optional; virtual method called by TpBaseCallChannel when removing the content

 

TpBaseCallContentGetInterfacesFunc get_interfaces;

extra interfaces provided by this content (this SHOULD NOT include TP_IFACE_CALL_CONTENT itself). Implementation must first chainup on parent class implementation then add extra interfaces into the GPtrArray.

 

TpBaseCallContentStartToneFunc start_tone;

optional; virtual method called when user requested to send a DTMF tone. Note that this method is already implemented by TpBaseMediaCallContent and so does not have to be overriden when using that subclass

 

TpBaseCallContentStopToneFunc stop_tone;

optional; virtual method called when user requested to stop sending currently being played DTMF tones. Note that this method is already implemented by TpBaseMediaCallContent and so does not have to be overriden when using that subclass

 

TpBaseCallContentMultipleTonesFunc multiple_tones;

optional; virtual method called when user requested to send multiple DTMF tones. Note that this method is already implemented by TpBaseMediaCallContent and so does not have to be overriden when using that subclass

 

Since: 0.17.5

Property Details

The “connection” property

  “connection”               TpBaseConnection *

TpBaseConnection object that owns this call content.

Owner: TpBaseCallContent

Flags: Read / Write / Construct Only

Since: 0.17.5


The “creator” property

  “creator”                  guint

The contact TpHandle of the creator of this content.

Owner: TpBaseCallContent

Flags: Read / Write / Construct Only

Default value: 0

Since: 0.17.5


The “currently-sending-tones” property

  “currently-sending-tones”  gboolean

If this content is currently sending tones or not

Owner: TpBaseCallContent

Flags: Read

Default value: FALSE

Since: 0.17.5


The “deferred-tones” property

  “deferred-tones”           gchar *

Tones that are waiting for the user action to play.

Owner: TpBaseCallContent

Flags: Read

Default value: NULL

Since: 0.17.5


The “disposition” property

  “disposition”              guint

The TpCallContentDisposition of this content.

Owner: TpBaseCallContent

Flags: Read / Write / Construct Only

Default value: 0

Since: 0.17.5


The “interfaces” property

  “interfaces”               GStrv

Additional interfaces implemented by this content.

Owner: TpBaseCallContent

Flags: Read

Since: 0.17.5


The “media-type” property

  “media-type”               guint

The TpMediaStreamType of this content.

Owner: TpBaseCallContent

Flags: Read / Write / Construct Only

Default value: 0

Since: 0.17.5


The “name” property

  “name”                     gchar *

The name of this content, if any.

Owner: TpBaseCallContent

Flags: Read / Write / Construct Only

Default value: ""

Since: 0.17.5


The “object-path” property

  “object-path”              gchar *

The D-Bus object path used for this object on the bus.

Owner: TpBaseCallContent

Flags: Read / Write / Construct Only

Default value: NULL

Since: 0.17.5


The “streams” property

  “streams”                  GPtrArray_DBusGObjectPath_ *

A GPtrArray of this content streams' “object-path”.

Owner: TpBaseCallContent

Flags: Read

Since: 0.17.5

See Also

TpSvcCallContent, TpBaseCallChannel and TpBaseCallStream