~ubuntu-branches/debian/sid/glusterfs/sid

« back to all changes in this revision

Viewing changes to contrib/qemu/include/qapi/qmp/json-streamer.h

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2014-04-22 10:00:41 UTC
  • mfrom: (1.3.25)
  • Revision ID: package-import@ubuntu.com-20140422100041-6mur2ttyvb8zzpfq
Tags: 3.5.0-1
* New upstream release.
  - Rewrite patch 01-spelling-error.
  - Adjust lintian overrides.
  - Install new files.
  - The offical tarball is not properly generated, hack it around.
  - Add symlink from fusermount-glusterfs manpage to mount.glusterfs.
  - Move gsync-sync-gfid from /usr/share to /usr/lib.
  - Add benchmarking directory.
* Remove old versioned build dependencies and build depend on libglib2.0-dev.
* Add lintian override for possible-gpl-code-linked-with-openssl. It is the
  same false positive like with the gluster-server package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * JSON streaming support
 
3
 *
 
4
 * Copyright IBM, Corp. 2009
 
5
 *
 
6
 * Authors:
 
7
 *  Anthony Liguori   <aliguori@us.ibm.com>
 
8
 *
 
9
 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
 
10
 * See the COPYING.LIB file in the top-level directory.
 
11
 *
 
12
 */
 
13
 
 
14
#ifndef QEMU_JSON_STREAMER_H
 
15
#define QEMU_JSON_STREAMER_H
 
16
 
 
17
#include "qapi/qmp/qlist.h"
 
18
#include "qapi/qmp/json-lexer.h"
 
19
 
 
20
typedef struct JSONMessageParser
 
21
{
 
22
    void (*emit)(struct JSONMessageParser *parser, QList *tokens);
 
23
    JSONLexer lexer;
 
24
    int brace_count;
 
25
    int bracket_count;
 
26
    QList *tokens;
 
27
    uint64_t token_size;
 
28
} JSONMessageParser;
 
29
 
 
30
void json_message_parser_init(JSONMessageParser *parser,
 
31
                              void (*func)(JSONMessageParser *, QList *));
 
32
 
 
33
int json_message_parser_feed(JSONMessageParser *parser,
 
34
                             const char *buffer, size_t size);
 
35
 
 
36
int json_message_parser_flush(JSONMessageParser *parser);
 
37
 
 
38
void json_message_parser_destroy(JSONMessageParser *parser);
 
39
 
 
40
#endif