Delta Chat Core C-API
 All Classes Functions Typedefs Groups Pages
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, eg. More...
 
#define DC_MSG_GIF   21
 Animated GIF message. More...
 
#define DC_MSG_IMAGE   20
 Image message. More...
 
#define DC_MSG_TEXT   10
 Text message. More...
 
#define DC_MSG_VIDEO   50
 Video messages. More...
 
#define DC_MSG_VOICE   41
 A voice message that was directly recorded by the user. 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, eg. the library does not regard DC_MSG_GIF as a subtype for DC_MSG_IMAGE and it's up to the UI to decide whether a GIF is shown eg. 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().

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

Macro Definition Documentation

#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(), dc_msg_get_duration().

#define DC_MSG_FILE   60

Message containing any file, eg.

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

#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(), dc_msg_get_height().

#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_set_file(), dc_msg_set_dimension().

#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().

#define DC_MSG_VIDEO   50

Video messages.

File, width, height and durarion 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(), dc_msg_get_duration().

#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 retieved via dc_msg_get_file(), dc_msg_get_duration()