~serge-hallyn/ubuntu/raring/libvirt/libvirt-hugepages

« back to all changes in this revision

Viewing changes to src/util/json.h

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-13 15:44:12 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20120513154412-fgmn5sxqdzgnzlx3
Tags: 0.9.12-0ubuntu1
* New upstream version:
  * Synchronize with debian packaging:
    - debian/control: Update build depends.
    - debian/libvirt-bin.postrm: Cleanup /var/log/libvirt
      on purge.
    - Bump standards verson (no changes).
    - debian/patches/Don-t-fail-if-we-can-t-setup-avahi.patch: Added
  * Dropped patches:
    - debian/patches/Debianize-libvirt-guests.patch
    - debian/patches/rewrite-lxc-controller-eof-handling-yet-again
    - debian/patches/ubuntu/libnl13.patch
    - debian/patches/ubuntu/fix-lxc-startup-error.patch
    - debian/patches/ubuntu/fix-bridge-fd.patch
    - debian/patches/ubuntu/skip-labelling-network-disks.patch
    - debian/patches/ubuntu/xen-xend-shutdown-detection.patch
    - debian/patches/ubuntu/xen-config-no-vfb-for-hvm.patch
    - debian/patches/debian/Disable-daemon-start-test.patch
    - debian/patches/debian/Disable-gnulib-s-test-nonplocking-pipe.sh.patch
    - debian/patches/ubuntu/9006-default-config-test-case.patch
    - debian/patches/fix-block-migration.patch
    - debian/patches/ubuntu/9022-qemu-unescape-HMP-commands-before-converting-them-to.patch
    - debian/patches/ubuntu/9023-qemu-change-rbd-auth_supported-separation-character-.patch
    - debian/patches/ubuntu/9024-qemu-allow-snapshotting-of-sheepdog-and-rbd-disks.patch
    - debian/patches/9025-qemu-change-rbd-auth_supported-separation-character-.patch
    - debian/patches/ubuntu/arm-gcc-workaround.patch
  * Rediffed:
    - debian/patches/Allow-libvirt-group-to-access-the-socket.patch
    - debian/patches/Disable-failing-virnetsockettest.patch
    - debian/patches/dnsmasq-as-priv-user
    - debian/patches/9002-better_default_uri_virsh.patch
  * debian/control: Add libnl-route-3-dev ass a build depends.
  * debian/patches/libnl3-build-fix.patch: Fix build with libnl3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * json.h: JSON object parsing/formatting
3
3
 *
 
4
 * Copyright (C) 2009, 2012 Red Hat, Inc.
4
5
 * Copyright (C) 2009 Daniel P. Berrange
5
 
 * Copyright (C) 2009 Red Hat, Inc.
6
6
 *
7
7
 * This library is free software; you can redistribute it and/or
8
8
 * modify it under the terms of the GNU Lesser General Public
27
27
# include "internal.h"
28
28
 
29
29
 
30
 
enum {
 
30
typedef enum {
31
31
    VIR_JSON_TYPE_OBJECT,
32
32
    VIR_JSON_TYPE_ARRAY,
33
33
    VIR_JSON_TYPE_STRING,
34
34
    VIR_JSON_TYPE_NUMBER,
35
35
    VIR_JSON_TYPE_BOOLEAN,
36
36
    VIR_JSON_TYPE_NULL,
37
 
};
 
37
} virJSONType;
38
38
 
39
39
typedef struct _virJSONValue virJSONValue;
40
40
typedef virJSONValue *virJSONValuePtr;
65
65
};
66
66
 
67
67
struct _virJSONValue {
68
 
    int type;
 
68
    int type; /* enum virJSONType */
 
69
    bool protect; /* prevents deletion when embedded in another object */
69
70
 
70
71
    union {
71
72
        virJSONObject object;
99
100
int virJSONValueArraySize(virJSONValuePtr object);
100
101
virJSONValuePtr virJSONValueArrayGet(virJSONValuePtr object, unsigned int element);
101
102
 
 
103
int virJSONValueObjectKeysNumber(virJSONValuePtr object);
 
104
const char *virJSONValueObjectGetKey(virJSONValuePtr object, unsigned int n);
 
105
virJSONValuePtr virJSONValueObjectGetValue(virJSONValuePtr object, unsigned int n);
 
106
 
102
107
const char *virJSONValueGetString(virJSONValuePtr object);
103
108
int virJSONValueGetNumberInt(virJSONValuePtr object, int *value);
104
109
int virJSONValueGetNumberUint(virJSONValuePtr object, unsigned int *value);