~ubuntu-branches/ubuntu/hoary/gnucash/hoary

« back to all changes in this revision

Viewing changes to src/engine/rpc/gncKVP.x

  • Committer: Bazaar Package Importer
  • Author(s): James A. Treacy
  • Date: 2002-03-16 14:14:59 UTC
  • Revision ID: james.westby@ubuntu.com-20020316141459-wtkyyrpfovryhl1s
Tags: upstream-1.6.6
ImportĀ upstreamĀ versionĀ 1.6.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * FILE:
 
3
 * gncKVP.x
 
4
 *
 
5
 * FUNCTION:
 
6
 * The RPC definition for a Gnucash kvp_frame
 
7
 *
 
8
 * HISTORY:
 
9
 * Created By:  Derek Atkins <warlord@MIT.EDU>
 
10
 * Copyright (c) 2001, Derek Atkins
 
11
 */
 
12
 
 
13
#ifndef __GNC_KVP_X
 
14
#define __GNC_KVP_X
 
15
 
 
16
#include "gncGUID.x"
 
17
 
 
18
#ifdef RPC_HDR
 
19
%#include "kvp_frame.h"
 
20
#endif
 
21
 
 
22
struct gncNumeric {
 
23
  int64_t       num;
 
24
  int64_t       denom;
 
25
};
 
26
 
 
27
struct gnc_kvp_valuelist {
 
28
  struct gnc_kvp_value *        val;
 
29
  gnc_kvp_valuelist *           next;
 
30
};
 
31
 
 
32
union gnc_kvp_value switch (enum_t type) { /* kvp_value_t */
 
33
 case KVP_TYPE_GINT64:
 
34
   int64_t                      int64;
 
35
 case KVP_TYPE_DOUBLE:
 
36
   double                       dbl;
 
37
 case KVP_TYPE_NUMERIC:
 
38
   gncNumeric                   numeric;
 
39
 case KVP_TYPE_STRING:
 
40
   string                       str<>;
 
41
 case KVP_TYPE_GUID:
 
42
   gncGUID                      guid;
 
43
 case KVP_TYPE_BINARY:
 
44
   opaque                       binary<>;
 
45
 case KVP_TYPE_GLIST:
 
46
   gnc_kvp_valuelist *          glist;
 
47
 case KVP_TYPE_FRAME:
 
48
   struct gnc_kvp_frame *       frame;
 
49
};
 
50
 
 
51
struct gnc_kvp {
 
52
  string                key<>;
 
53
  gnc_kvp_value *       value;
 
54
};
 
55
 
 
56
struct gnc_kvp_frame {
 
57
  gnc_kvp *             data;
 
58
  gnc_kvp_frame *       next;
 
59
};
 
60
 
 
61
#endif /* __GNC_KVP_X */