diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-06-22 10:53:24 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-06-22 10:53:24 +0200 |
commit | 9123e24e7b68ad36d4ac2b8f325ea249a5ea9ff5 (patch) | |
tree | 2af4db555c749d23e826b617d3f4fece63cd5c7a /client/demarshallers.h | |
parent | ae1de849acd1e58772dc3f318324ed936ff5f21c (diff) | |
download | spice-9123e24e7b68ad36d4ac2b8f325ea249a5ea9ff5.tar.gz spice-9123e24e7b68ad36d4ac2b8f325ea249a5ea9ff5.tar.xz spice-9123e24e7b68ad36d4ac2b8f325ea249a5ea9ff5.zip |
Add destructor for demarshalled messages
This is required because we don't want to free messages that just
refer to the unparsed message (like SpiceMsgData).
Also, in the future we might need it for more complex demarshalling.
Diffstat (limited to 'client/demarshallers.h')
-rw-r--r-- | client/demarshallers.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/demarshallers.h b/client/demarshallers.h index 81189735..ab0fc58c 100644 --- a/client/demarshallers.h +++ b/client/demarshallers.h @@ -17,7 +17,9 @@ #ifndef _H_DEMARSHAL #define _H_DEMARSHAL -typedef uint8_t * (*spice_parse_channel_func_t)(uint8_t *message_start, uint8_t *message_end, uint16_t message_type, int minor, size_t *size_out); +typedef void (*message_destructor_t)(uint8_t *message); +typedef uint8_t * (*spice_parse_channel_func_t)(uint8_t *message_start, uint8_t *message_end, uint16_t message_type, int minor, + size_t *size_out, message_destructor_t *free_message); spice_parse_channel_func_t spice_get_server_channel_parser(uint32_t channel, unsigned int *max_message_type); |