Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/scanner/annotation.h
blob: 6904f15ceba250a61f9de752b20019fcf0e5e380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#ifndef __ANNOTATION_OBJECT_H__
#define __ANNOTATION_OBJECT_H__

#include <glib-object.h>

/**
 * AnnotationCallback:
 * @in: (in) (transfer none): array of ints
 *
 * This is a callback.
 * Return value: (transfer none): array of ints
 */
typedef const gint* (*AnnotationCallback) (const gint *in);

/**
 * AnnotationListCallback:
 * @in: (in) (transfer none) (element-type utf8): list of strings
 *
 * This is a callback taking a list.
 * Return value: (transfer container) (element-type utf8): list of strings
 */
typedef GList* (*AnnotationListCallback) (GList *in);

/**
 * AnnotationObject:
 *
 * This is an object used to test annotations.
 */
typedef struct _AnnotationObject          AnnotationObject;
typedef struct _AnnotationObjectClass     AnnotationObjectClass;

typedef void (*AnnotationForeachFunc) (AnnotationObject *object,
                                       const char *item,
                                       gpointer user_data);

struct _AnnotationObject
{
  GObject parent_instance;
};

struct _AnnotationObjectClass
{
  GObjectClass parent_class;
};

GType    annotation_object_get_type (void);

gint     annotation_object_method       (AnnotationObject *object);
gint     annotation_object_out          (AnnotationObject *object,
					 int              *outarg);
GObject* annotation_object_create_object(AnnotationObject *object);
GObject* annotation_object_allow_none   (AnnotationObject *object,
					 const gchar      *somearg);
GObject* annotation_object_notrans      (AnnotationObject *object);
gint     annotation_object_inout        (AnnotationObject *object,
					 int              *inoutarg);
gint     annotation_object_inout2       (AnnotationObject *object,
					 int              *inoutarg);
gint     annotation_object_inout3       (AnnotationObject *object,
					 int              *inoutarg);
gint     annotation_object_in           (AnnotationObject *object,
					 int              *inarg);
gint     annotation_object_calleeowns   (AnnotationObject *object,
					 GObject          **toown);
gint     annotation_object_calleesowns  (AnnotationObject *object,
					 GObject          **toown1,
					 GObject          **toown2);
GList*   annotation_object_get_strings  (AnnotationObject *object);
GHashTable*annotation_object_get_hash   (AnnotationObject *object);
void     annotation_object_with_voidp   (AnnotationObject *object,
					 void             *data);
GSList*  annotation_object_get_objects  (AnnotationObject *object);

void     annotation_object_use_buffer   (AnnotationObject *object,
					 guchar           *bytes);

void     annotation_object_compute_sum  (AnnotationObject *object,
					 int              *nums);

void     annotation_object_compute_sum_n(AnnotationObject *object,
					 int              *nums,
					 int               n_nums);
void     annotation_object_compute_sum_nz(AnnotationObject *object,
                                          int             *nums,
                                          int              n_nums);
void     annotation_object_parse_args   (AnnotationObject *object,
                                         int              *argc,
                                         char           ***argv);
gboolean annotation_object_string_out   (AnnotationObject *object,
                                         char            **str_out);
void     annotation_object_foreach      (AnnotationObject *object,
                                         AnnotationForeachFunc func,
                                         gpointer user_data);

void     annotation_object_set_data     (AnnotationObject *object,
                                         const guchar     *data,
                                         gsize             length);
void     annotation_object_set_data2    (AnnotationObject *object,
                                         const gchar      *data,
                                         gsize             length);
void     annotation_object_set_data3    (AnnotationObject *object,
                                         gpointer          data,
                                         gsize             length);

GObject* annotation_object_do_not_use   (AnnotationObject *object);

void     annotation_init                (int              *argc, 
					 char           ***argv);
char **  annotation_return_array        (int             *length);
void     annotation_versioned           (void);
char **  annotation_string_zero_terminated (void);
void     annotation_string_zero_terminated_out (char ***out);

/**
 * AnnotationStruct:
 *
 * This is a test of an array of object in an field of a struct.
 */
struct AnnotationStruct
{
  AnnotationObject *objects[10];
};

#endif /* __ANNOTATION_OBJECT_H__ */