Delta Chat Core C Interface
Loading...
Searching...
No Matches
Macros
DC_MSG

With these constants the type of a message is defined. More...

Macros

#define DC_MSG_AUDIO   40
 Message containing an audio file. More...
 
#define DC_MSG_FILE   60
 Message containing any file, e.g. More...
 
#define DC_MSG_GIF   21
 Animated GIF message. More...
 
#define DC_MSG_IMAGE   20
 Image message. More...
 
#define DC_MSG_STICKER   23
 Message containing a sticker, similar to image. More...
 
#define DC_MSG_TEXT   10
 Text message. More...
 
#define DC_MSG_VIDEO   50
 Video messages. More...
 
#define DC_MSG_VIDEOCHAT_INVITATION   70
 Message indicating an incoming or outgoing videochat. More...
 
#define DC_MSG_VOICE   41
 A voice message that was directly recorded by the user. More...
 
#define DC_MSG_WEBXDC   80
 The message is a webxdc instance. More...
 

Detailed Description

With these constants the type of a message is defined.

From the view of the library, all types are primary types of the same level, e.g. the library does not regard DC_MSG_GIF as a subtype for DC_MSG_IMAGE and it is up to the UI to decide whether a GIF is shown e.g. in an image or in a video container.

If you want to define the type of a dc_msg_t object for sending, use dc_msg_new(). Depending on the type, you will set more properties using e.g. dc_msg_set_text() or dc_msg_set_file(). To finally send the message, use dc_send_msg().

To get the types of dc_msg_t objects received, use dc_msg_get_viewtype().

Macro Definition Documentation

◆ DC_MSG_AUDIO

#define DC_MSG_AUDIO   40

Message containing an audio file.

File and duration are set via dc_msg_set_file(), dc_msg_set_duration() and retrieved via dc_msg_get_file(), and dc_msg_get_duration().

◆ DC_MSG_FILE

#define DC_MSG_FILE   60

Message containing any file, e.g.

a PDF. The file is set via dc_msg_set_file() and retrieved via dc_msg_get_file().

◆ DC_MSG_GIF

#define DC_MSG_GIF   21

Animated GIF message.

File, width, and height are set via dc_msg_set_file(), dc_msg_set_dimension() and retrieved via dc_msg_get_file(), dc_msg_get_width(), and dc_msg_get_height().

◆ DC_MSG_IMAGE

#define DC_MSG_IMAGE   20

Image message.

If the image is an animated GIF, the type DC_MSG_GIF should be used. File, width, and height are set via dc_msg_set_file(), dc_msg_set_dimension() and retrieved via dc_msg_get_file(), dc_msg_get_width(), and dc_msg_get_height().

Before sending, the image is recoded to an reasonable size, see dc_set_config()-option media_quality. If you do not want images to be recoded, send them as DC_MSG_FILE.

◆ DC_MSG_STICKER

#define DC_MSG_STICKER   23

Message containing a sticker, similar to image.

If possible, the UI should display the image without borders in a transparent way. A click on a sticker will offer to install the sticker set in some future.

◆ DC_MSG_TEXT

#define DC_MSG_TEXT   10

Text message.

The text of the message is set using dc_msg_set_text() and retrieved with dc_msg_get_text().

◆ DC_MSG_VIDEO

#define DC_MSG_VIDEO   50

Video messages.

File, width, height, and duration are set via dc_msg_set_file(), dc_msg_set_dimension(), dc_msg_set_duration() and retrieved via dc_msg_get_file(), dc_msg_get_width(), dc_msg_get_height(), and dc_msg_get_duration().

◆ DC_MSG_VIDEOCHAT_INVITATION

#define DC_MSG_VIDEOCHAT_INVITATION   70

Message indicating an incoming or outgoing videochat.

The message was created via dc_send_videochat_invitation() on this or a remote device.

Typically, such messages are rendered differently by the UIs, e.g. contain a button to join the videochat. The URL for joining can be retrieved using dc_msg_get_videochat_url().

◆ DC_MSG_VOICE

#define DC_MSG_VOICE   41

A voice message that was directly recorded by the user.

For all other audio messages, the type DC_MSG_AUDIO should be used. File and duration are set via dc_msg_set_file(), dc_msg_set_duration() and retrieved via dc_msg_get_file(), and dc_msg_get_duration().

◆ DC_MSG_WEBXDC

#define DC_MSG_WEBXDC   80

The message is a webxdc instance.

To send data to a webxdc instance, use dc_send_webxdc_status_update().