## GeditMessage GeditMessage — message bus message object |

## Synopsis

    #include <gedit/gedit-message.h>

                        GeditMessage;
    void                gedit_message_get                   (GeditMessage *message,
                                                             ...);
    void                gedit_message_get_valist            (GeditMessage *message,
                                                             va_list var_args);
    void                gedit_message_get_value             (GeditMessage *message,
                                                             const gchar *key,
                                                             GValue *value);
    void                gedit_message_set                   (GeditMessage *message,
                                                             ...);
    void                gedit_message_set_valist            (GeditMessage *message,
                                                             va_list var_args);
    void                gedit_message_set_value             (GeditMessage *message,
                                                             const gchar *key,
                                                             GValue *value);
    void                gedit_message_set_valuesv           (GeditMessage *message,
                                                             const gchar **keys,
                                                             GValue *values,
                                                             gint n_values);
    const gchar *       gedit_message_get_object_path       (GeditMessage *message);
    const gchar *       gedit_message_get_method            (GeditMessage *message);
    gboolean            gedit_message_has_key               (GeditMessage *message,
                                                             const gchar *key);
    GType               gedit_message_get_key_type          (GeditMessage *message,
                                                             const gchar *key);
    gboolean            gedit_message_validate              (GeditMessage *message);

## Object Hierarchy

      GObject
       +----GeditMessage

## Properties

      "method"                   gchar*                : Read
      "object-path"              gchar*                : Read
      "type"                     GeditMessageType*     : Read / Write / Construct Only

## Description

Communication on a GeditMessageBus is done through messages. Messages are sent over the bus and received by connecting callbacks on the message bus. A GeditMessage is an instantiation of a GeditMessageType, containing values for the arguments as specified in the message type.

A message can be seen as a method call, or signal emission depending on who is the sender and who is the receiver. There is no explicit distinction between methods and signals.

## Details

### GeditMessage

    typedef struct _GeditMessage GeditMessage;

### gedit_message_get ()

    void                gedit_message_get                   (GeditMessage *message,
                                                             ...);

Get values of message arguments. The supplied `var_args` should contain pairs of keys and pointers to variables which are set to the argument value for the specified key.

`message` : | the GeditMessage
`...` : | a NULL variable argument list of key/value container pairs

### gedit_message_get_valist ()

    void                gedit_message_get_valist            (GeditMessage *message,
                                                             va_list var_args);

Get values of message arguments. The supplied `var_args` should contain pairs of keys and pointers to variables which are set to the argument value for the specified key.

`message` : | the GeditMessage
`var_args` : | a NULL variable argument list of key/value container pairs

### gedit_message_get_value ()

    void                gedit_message_get_value             (GeditMessage *message,
                                                             const gchar *key,
                                                             GValue *value);

Get the value of a specific message argument. `value` will be initialized with the correct type.

`message` : | the GeditMessage
`key` : | the argument key
`value` : | value return container

### gedit_message_set ()

    void                gedit_message_set                   (GeditMessage *message,
                                                             ...);

Set values of message arguments. The supplied `var_args` should contain pairs of keys and argument values.

`message` : | the GeditMessage
`...` : | a NULL terminated variable list of key/value pairs

### gedit_message_set_valist ()

    void                gedit_message_set_valist            (GeditMessage *message,
                                                             va_list var_args);

Set values of message arguments. The supplied `var_args` should contain pairs of keys and argument values.

`message` : | the GeditMessage
`var_args` : | a NULL terminated variable list of key/value pairs

### gedit_message_set_value ()

    void                gedit_message_set_value             (GeditMessage *message,
                                                             const gchar *key,
                                                             GValue *value);

Set value of message argument `key` to `value`.

`message` : | the GeditMessage
`key` : | the argument key
`value` : | the argument value

### gedit_message_set_valuesv ()

    void                gedit_message_set_valuesv           (GeditMessage *message,
                                                             const gchar **keys,
                                                             GValue *values,
                                                             gint n_values);

Set message argument values.

`message` : | the GeditMessage
`keys` : | keys to set values for
`values` : | values to set
`n_values` : | number of arguments to set values for

### gedit_message_get_object_path ()

    const gchar *       gedit_message_get_object_path       (GeditMessage *message);

Get the message object path.

`message` : | the GeditMessage
Returns : | the message object path

### gedit_message_get_method ()

    const gchar *       gedit_message_get_method            (GeditMessage *message);

Get the message method.

`message` : | the GeditMessage
Returns : | the message method

### gedit_message_has_key ()

    gboolean            gedit_message_has_key               (GeditMessage *message,
                                                             const gchar *key);

Check whether the message has a specific key.

`message` : | the GeditMessage
`key` : | the argument key
Returns : | `TRUE` if `message` has argument `key`

### gedit_message_get_key_type ()

    GType               gedit_message_get_key_type          (GeditMessage *message,
                                                             const gchar *key);

Get the type of a message argument.

`message` : | the GeditMessage
`key` : | the argument key
Returns : | the type of `key`

### gedit_message_validate ()

    gboolean            gedit_message_validate              (GeditMessage *message);

Validates the message arguments according to the message type.

`message` : | the GeditMessage
Returns : | `TRUE` if the message is valid

## Property Details

### The `"method"` property

      "method"                   gchar*                : Read

The messages method.

Default value: NULL

### The `"object-path"` property

      "object-path"              gchar*                : Read

The message object path.

Default value: NULL

### The `"type"` property

      "type"                     GeditMessageType*     : Read / Write / Construct Only

The message type.