summaryrefslogtreecommitdiff
path: root/include/capi/cef_values_capi.h
blob: 50abd75f3f5d80f7e87de7a8068ef34560a779e0 (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//    * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//    * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//    * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=1b8f7f620685c30b91c8fa656e1a01d182684ae6$
//

#ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_
#pragma once

#include "include/capi/cef_base_capi.h"

#ifdef __cplusplus
extern "C" {
#endif

struct _cef_binary_value_t;
struct _cef_dictionary_value_t;
struct _cef_list_value_t;

///
/// Structure that wraps other data value types. Complex types (binary,
/// dictionary and list) will be referenced but not owned by this object. Can be
/// used on any process and thread.
///
typedef struct _cef_value_t {
  ///
  /// Base structure.
  ///
  cef_base_ref_counted_t base;

  ///
  /// Returns true (1) if the underlying data is valid. This will always be true
  /// (1) for simple types. For complex types (binary, dictionary and list) the
  /// underlying data may become invalid if owned by another object (e.g. list
  /// or dictionary) and that other object is then modified or destroyed. This
  /// value object can be re-used by calling Set*() even if the underlying data
  /// is invalid.
  ///
  int(CEF_CALLBACK* is_valid)(struct _cef_value_t* self);

  ///
  /// Returns true (1) if the underlying data is owned by another object.
  ///
  int(CEF_CALLBACK* is_owned)(struct _cef_value_t* self);

  ///
  /// Returns true (1) if the underlying data is read-only. Some APIs may expose
  /// read-only objects.
  ///
  int(CEF_CALLBACK* is_read_only)(struct _cef_value_t* self);

  ///
  /// Returns true (1) if this object and |that| object have the same underlying
  /// data. If true (1) modifications to this object will also affect |that|
  /// object and vice-versa.
  ///
  int(CEF_CALLBACK* is_same)(struct _cef_value_t* self,
                             struct _cef_value_t* that);

  ///
  /// Returns true (1) if this object and |that| object have an equivalent
  /// underlying value but are not necessarily the same object.
  ///
  int(CEF_CALLBACK* is_equal)(struct _cef_value_t* self,
                              struct _cef_value_t* that);

  ///
  /// Returns a copy of this object. The underlying data will also be copied.
  ///
  struct _cef_value_t*(CEF_CALLBACK* copy)(struct _cef_value_t* self);

  ///
  /// Returns the underlying value type.
  ///
  cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_value_t* self);

  ///
  /// Returns the underlying value as type bool.
  ///
  int(CEF_CALLBACK* get_bool)(struct _cef_value_t* self);

  ///
  /// Returns the underlying value as type int.
  ///
  int(CEF_CALLBACK* get_int)(struct _cef_value_t* self);

  ///
  /// Returns the underlying value as type double.
  ///
  double(CEF_CALLBACK* get_double)(struct _cef_value_t* self);

  ///
  /// Returns the underlying value as type string.
  ///
  // The resulting string must be freed by calling cef_string_userfree_free().
  cef_string_userfree_t(CEF_CALLBACK* get_string)(struct _cef_value_t* self);

  ///
  /// Returns the underlying value as type binary. The returned reference may
  /// become invalid if the value is owned by another object or if ownership is
  /// transferred to another object in the future. To maintain a reference to
  /// the value after assigning ownership to a dictionary or list pass this
  /// object to the set_value() function instead of passing the returned
  /// reference to set_binary().
  ///
  struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)(
      struct _cef_value_t* self);

  ///
  /// Returns the underlying value as type dictionary. The returned reference
  /// may become invalid if the value is owned by another object or if ownership
  /// is transferred to another object in the future. To maintain a reference to
  /// the value after assigning ownership to a dictionary or list pass this
  /// object to the set_value() function instead of passing the returned
  /// reference to set_dictionary().
  ///
  struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
      struct _cef_value_t* self);

  ///
  /// Returns the underlying value as type list. The returned reference may
  /// become invalid if the value is owned by another object or if ownership is
  /// transferred to another object in the future. To maintain a reference to
  /// the value after assigning ownership to a dictionary or list pass this
  /// object to the set_value() function instead of passing the returned
  /// reference to set_list().
  ///
  struct _cef_list_value_t*(CEF_CALLBACK* get_list)(struct _cef_value_t* self);

  ///
  /// Sets the underlying value as type null. Returns true (1) if the value was
  /// set successfully.
  ///
  int(CEF_CALLBACK* set_null)(struct _cef_value_t* self);

  ///
  /// Sets the underlying value as type bool. Returns true (1) if the value was
  /// set successfully.
  ///
  int(CEF_CALLBACK* set_bool)(struct _cef_value_t* self, int value);

  ///
  /// Sets the underlying value as type int. Returns true (1) if the value was
  /// set successfully.
  ///
  int(CEF_CALLBACK* set_int)(struct _cef_value_t* self, int value);

  ///
  /// Sets the underlying value as type double. Returns true (1) if the value
  /// was set successfully.
  ///
  int(CEF_CALLBACK* set_double)(struct _cef_value_t* self, double value);

  ///
  /// Sets the underlying value as type string. Returns true (1) if the value
  /// was set successfully.
  ///
  int(CEF_CALLBACK* set_string)(struct _cef_value_t* self,
                                const cef_string_t* value);

  ///
  /// Sets the underlying value as type binary. Returns true (1) if the value
  /// was set successfully. This object keeps a reference to |value| and
  /// ownership of the underlying data remains unchanged.
  ///
  int(CEF_CALLBACK* set_binary)(struct _cef_value_t* self,
                                struct _cef_binary_value_t* value);

  ///
  /// Sets the underlying value as type dict. Returns true (1) if the value was
  /// set successfully. This object keeps a reference to |value| and ownership
  /// of the underlying data remains unchanged.
  ///
  int(CEF_CALLBACK* set_dictionary)(struct _cef_value_t* self,
                                    struct _cef_dictionary_value_t* value);

  ///
  /// Sets the underlying value as type list. Returns true (1) if the value was
  /// set successfully. This object keeps a reference to |value| and ownership
  /// of the underlying data remains unchanged.
  ///
  int(CEF_CALLBACK* set_list)(struct _cef_value_t* self,
                              struct _cef_list_value_t* value);
} cef_value_t;

///
/// Creates a new object.
///
CEF_EXPORT cef_value_t* cef_value_create(void);

///
/// Structure representing a binary value. Can be used on any process and
/// thread.
///
typedef struct _cef_binary_value_t {
  ///
  /// Base structure.
  ///
  cef_base_ref_counted_t base;

  ///
  /// Returns true (1) if this object is valid. This object may become invalid
  /// if the underlying data is owned by another object (e.g. list or
  /// dictionary) and that other object is then modified or destroyed. Do not
  /// call any other functions if this function returns false (0).
  ///
  int(CEF_CALLBACK* is_valid)(struct _cef_binary_value_t* self);

  ///
  /// Returns true (1) if this object is currently owned by another object.
  ///
  int(CEF_CALLBACK* is_owned)(struct _cef_binary_value_t* self);

  ///
  /// Returns true (1) if this object and |that| object have the same underlying
  /// data.
  ///
  int(CEF_CALLBACK* is_same)(struct _cef_binary_value_t* self,
                             struct _cef_binary_value_t* that);

  ///
  /// Returns true (1) if this object and |that| object have an equivalent
  /// underlying value but are not necessarily the same object.
  ///
  int(CEF_CALLBACK* is_equal)(struct _cef_binary_value_t* self,
                              struct _cef_binary_value_t* that);

  ///
  /// Returns a copy of this object. The data in this object will also be
  /// copied.
  ///
  struct _cef_binary_value_t*(CEF_CALLBACK* copy)(
      struct _cef_binary_value_t* self);

  ///
  /// Returns the data size.
  ///
  size_t(CEF_CALLBACK* get_size)(struct _cef_binary_value_t* self);

  ///
  /// Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
  /// the specified byte |data_offset|. Returns the number of bytes read.
  ///
  size_t(CEF_CALLBACK* get_data)(struct _cef_binary_value_t* self,
                                 void* buffer,
                                 size_t buffer_size,
                                 size_t data_offset);
} cef_binary_value_t;

///
/// Creates a new object that is not owned by any other object. The specified
/// |data| will be copied.
///
CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data,
                                                       size_t data_size);

///
/// Structure representing a dictionary value. Can be used on any process and
/// thread.
///
typedef struct _cef_dictionary_value_t {
  ///
  /// Base structure.
  ///
  cef_base_ref_counted_t base;

  ///
  /// Returns true (1) if this object is valid. This object may become invalid
  /// if the underlying data is owned by another object (e.g. list or
  /// dictionary) and that other object is then modified or destroyed. Do not
  /// call any other functions if this function returns false (0).
  ///
  int(CEF_CALLBACK* is_valid)(struct _cef_dictionary_value_t* self);

  ///
  /// Returns true (1) if this object is currently owned by another object.
  ///
  int(CEF_CALLBACK* is_owned)(struct _cef_dictionary_value_t* self);

  ///
  /// Returns true (1) if the values of this object are read-only. Some APIs may
  /// expose read-only objects.
  ///
  int(CEF_CALLBACK* is_read_only)(struct _cef_dictionary_value_t* self);

  ///
  /// Returns true (1) if this object and |that| object have the same underlying
  /// data. If true (1) modifications to this object will also affect |that|
  /// object and vice-versa.
  ///
  int(CEF_CALLBACK* is_same)(struct _cef_dictionary_value_t* self,
                             struct _cef_dictionary_value_t* that);

  ///
  /// Returns true (1) if this object and |that| object have an equivalent
  /// underlying value but are not necessarily the same object.
  ///
  int(CEF_CALLBACK* is_equal)(struct _cef_dictionary_value_t* self,
                              struct _cef_dictionary_value_t* that);

  ///
  /// Returns a writable copy of this object. If |exclude_NULL_children| is true
  /// (1) any NULL dictionaries or lists will be excluded from the copy.
  ///
  struct _cef_dictionary_value_t*(CEF_CALLBACK* copy)(
      struct _cef_dictionary_value_t* self,
      int exclude_empty_children);

  ///
  /// Returns the number of values.
  ///
  size_t(CEF_CALLBACK* get_size)(struct _cef_dictionary_value_t* self);

  ///
  /// Removes all values. Returns true (1) on success.
  ///
  int(CEF_CALLBACK* clear)(struct _cef_dictionary_value_t* self);

  ///
  /// Returns true (1) if the current dictionary has a value for the given key.
  ///
  int(CEF_CALLBACK* has_key)(struct _cef_dictionary_value_t* self,
                             const cef_string_t* key);

  ///
  /// Reads all keys for this dictionary into the specified vector.
  ///
  int(CEF_CALLBACK* get_keys)(struct _cef_dictionary_value_t* self,
                              cef_string_list_t keys);

  ///
  /// Removes the value at the specified key. Returns true (1) is the value was
  /// removed successfully.
  ///
  int(CEF_CALLBACK* remove)(struct _cef_dictionary_value_t* self,
                            const cef_string_t* key);

  ///
  /// Returns the value type for the specified key.
  ///
  cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_dictionary_value_t* self,
                                           const cef_string_t* key);

  ///
  /// Returns the value at the specified key. For simple types the returned
  /// value will copy existing data and modifications to the value will not
  /// modify this object. For complex types (binary, dictionary and list) the
  /// returned value will reference existing data and modifications to the value
  /// will modify this object.
  ///
  struct _cef_value_t*(CEF_CALLBACK* get_value)(
      struct _cef_dictionary_value_t* self,
      const cef_string_t* key);

  ///
  /// Returns the value at the specified key as type bool.
  ///
  int(CEF_CALLBACK* get_bool)(struct _cef_dictionary_value_t* self,
                              const cef_string_t* key);

  ///
  /// Returns the value at the specified key as type int.
  ///
  int(CEF_CALLBACK* get_int)(struct _cef_dictionary_value_t* self,
                             const cef_string_t* key);

  ///
  /// Returns the value at the specified key as type double.
  ///
  double(CEF_CALLBACK* get_double)(struct _cef_dictionary_value_t* self,
                                   const cef_string_t* key);

  ///
  /// Returns the value at the specified key as type string.
  ///
  // The resulting string must be freed by calling cef_string_userfree_free().
  cef_string_userfree_t(CEF_CALLBACK* get_string)(
      struct _cef_dictionary_value_t* self,
      const cef_string_t* key);

  ///
  /// Returns the value at the specified key as type binary. The returned value
  /// will reference existing data.
  ///
  struct _cef_binary_value_t*(CEF_CALLBACK* get_binary)(
      struct _cef_dictionary_value_t* self,
      const cef_string_t* key);

  ///
  /// Returns the value at the specified key as type dictionary. The returned
  /// value will reference existing data and modifications to the value will
  /// modify this object.
  ///
  struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
      struct _cef_dictionary_value_t* self,
      const cef_string_t* key);

  ///
  /// Returns the value at the specified key as type list. The returned value
  /// will reference existing data and modifications to the value will modify
  /// this object.
  ///
  struct _cef_list_value_t*(CEF_CALLBACK* get_list)(
      struct _cef_dictionary_value_t* self,
      const cef_string_t* key);

  ///
  /// Sets the value at the specified key. Returns true (1) if the value was set
  /// successfully. If |value| represents simple data then the underlying data
  /// will be copied and modifications to |value| will not modify this object.
  /// If |value| represents complex data (binary, dictionary or list) then the
  /// underlying data will be referenced and modifications to |value| will
  /// modify this object.
  ///
  int(CEF_CALLBACK* set_value)(struct _cef_dictionary_value_t* self,
                               const cef_string_t* key,
                               struct _cef_value_t* value);

  ///
  /// Sets the value at the specified key as type null. Returns true (1) if the
  /// value was set successfully.
  ///
  int(CEF_CALLBACK* set_null)(struct _cef_dictionary_value_t* self,
                              const cef_string_t* key);

  ///
  /// Sets the value at the specified key as type bool. Returns true (1) if the
  /// value was set successfully.
  ///
  int(CEF_CALLBACK* set_bool)(struct _cef_dictionary_value_t* self,
                              const cef_string_t* key,
                              int value);

  ///
  /// Sets the value at the specified key as type int. Returns true (1) if the
  /// value was set successfully.
  ///
  int(CEF_CALLBACK* set_int)(struct _cef_dictionary_value_t* self,
                             const cef_string_t* key,
                             int value);

  ///
  /// Sets the value at the specified key as type double. Returns true (1) if
  /// the value was set successfully.
  ///
  int(CEF_CALLBACK* set_double)(struct _cef_dictionary_value_t* self,
                                const cef_string_t* key,
                                double value);

  ///
  /// Sets the value at the specified key as type string. Returns true (1) if
  /// the value was set successfully.
  ///
  int(CEF_CALLBACK* set_string)(struct _cef_dictionary_value_t* self,
                                const cef_string_t* key,
                                const cef_string_t* value);

  ///
  /// Sets the value at the specified key as type binary. Returns true (1) if
  /// the value was set successfully. If |value| is currently owned by another
  /// object then the value will be copied and the |value| reference will not
  /// change. Otherwise, ownership will be transferred to this object and the
  /// |value| reference will be invalidated.
  ///
  int(CEF_CALLBACK* set_binary)(struct _cef_dictionary_value_t* self,
                                const cef_string_t* key,
                                struct _cef_binary_value_t* value);

  ///
  /// Sets the value at the specified key as type dict. Returns true (1) if the
  /// value was set successfully. If |value| is currently owned by another
  /// object then the value will be copied and the |value| reference will not
  /// change. Otherwise, ownership will be transferred to this object and the
  /// |value| reference will be invalidated.
  ///
  int(CEF_CALLBACK* set_dictionary)(struct _cef_dictionary_value_t* self,
                                    const cef_string_t* key,
                                    struct _cef_dictionary_value_t* value);

  ///
  /// Sets the value at the specified key as type list. Returns true (1) if the
  /// value was set successfully. If |value| is currently owned by another
  /// object then the value will be copied and the |value| reference will not
  /// change. Otherwise, ownership will be transferred to this object and the
  /// |value| reference will be invalidated.
  ///
  int(CEF_CALLBACK* set_list)(struct _cef_dictionary_value_t* self,
                              const cef_string_t* key,
                              struct _cef_list_value_t* value);
} cef_dictionary_value_t;

///
/// Creates a new object that is not owned by any other object.
///
CEF_EXPORT cef_dictionary_value_t* cef_dictionary_value_create(void);

///
/// Structure representing a list value. Can be used on any process and thread.
///
typedef struct _cef_list_value_t {
  ///
  /// Base structure.
  ///
  cef_base_ref_counted_t base;

  ///
  /// Returns true (1) if this object is valid. This object may become invalid
  /// if the underlying data is owned by another object (e.g. list or
  /// dictionary) and that other object is then modified or destroyed. Do not
  /// call any other functions if this function returns false (0).
  ///
  int(CEF_CALLBACK* is_valid)(struct _cef_list_value_t* self);

  ///
  /// Returns true (1) if this object is currently owned by another object.
  ///
  int(CEF_CALLBACK* is_owned)(struct _cef_list_value_t* self);

  ///
  /// Returns true (1) if the values of this object are read-only. Some APIs may
  /// expose read-only objects.
  ///
  int(CEF_CALLBACK* is_read_only)(struct _cef_list_value_t* self);

  ///
  /// Returns true (1) if this object and |that| object have the same underlying
  /// data. If true (1) modifications to this object will also affect |that|
  /// object and vice-versa.
  ///
  int(CEF_CALLBACK* is_same)(struct _cef_list_value_t* self,
                             struct _cef_list_value_t* that);

  ///
  /// Returns true (1) if this object and |that| object have an equivalent
  /// underlying value but are not necessarily the same object.
  ///
  int(CEF_CALLBACK* is_equal)(struct _cef_list_value_t* self,
                              struct _cef_list_value_t* that);

  ///
  /// Returns a writable copy of this object.
  ///
  struct _cef_list_value_t*(CEF_CALLBACK* copy)(struct _cef_list_value_t* self);

  ///
  /// Sets the number of values. If the number of values is expanded all new
  /// value slots will default to type null. Returns true (1) on success.
  ///
  int(CEF_CALLBACK* set_size)(struct _cef_list_value_t* self, size_t size);

  ///
  /// Returns the number of values.
  ///
  size_t(CEF_CALLBACK* get_size)(struct _cef_list_value_t* self);

  ///
  /// Removes all values. Returns true (1) on success.
  ///
  int(CEF_CALLBACK* clear)(struct _cef_list_value_t* self);

  ///
  /// Removes the value at the specified index.
  ///
  int(CEF_CALLBACK* remove)(struct _cef_list_value_t* self, size_t index);

  ///
  /// Returns the value type at the specified index.
  ///
  cef_value_type_t(CEF_CALLBACK* get_type)(struct _cef_list_value_t* self,
                                           size_t index);

  ///
  /// Returns the value at the specified index. For simple types the returned
  /// value will copy existing data and modifications to the value will not
  /// modify this object. For complex types (binary, dictionary and list) the
  /// returned value will reference existing data and modifications to the value
  /// will modify this object.
  ///
  struct _cef_value_t*(CEF_CALLBACK* get_value)(struct _cef_list_value_t* self,
                                                size_t index);

  ///
  /// Returns the value at the specified index as type bool.
  ///
  int(CEF_CALLBACK* get_bool)(struct _cef_list_value_t* self, size_t index);

  ///
  /// Returns the value at the specified index as type int.
  ///
  int(CEF_CALLBACK* get_int)(struct _cef_list_value_t* self, size_t index);

  ///
  /// Returns the value at the specified index as type double.
  ///
  double(CEF_CALLBACK* get_double)(struct _cef_list_value_t* self,
                                   size_t index);

  ///
  /// Returns the value at the specified index as type string.
  ///
  // The resulting string must be freed by calling cef_string_userfree_free().
  cef_string_userfree_t(
      CEF_CALLBACK* get_string)(struct _cef_list_value_t* self, size_t index);

  ///
  /// Returns the value at the specified index as type binary. The returned
  /// value will reference existing data.
  ///
  struct _cef_binary_value_t*(
      CEF_CALLBACK* get_binary)(struct _cef_list_value_t* self, size_t index);

  ///
  /// Returns the value at the specified index as type dictionary. The returned
  /// value will reference existing data and modifications to the value will
  /// modify this object.
  ///
  struct _cef_dictionary_value_t*(CEF_CALLBACK* get_dictionary)(
      struct _cef_list_value_t* self,
      size_t index);

  ///
  /// Returns the value at the specified index as type list. The returned value
  /// will reference existing data and modifications to the value will modify
  /// this object.
  ///
  struct _cef_list_value_t*(
      CEF_CALLBACK* get_list)(struct _cef_list_value_t* self, size_t index);

  ///
  /// Sets the value at the specified index. Returns true (1) if the value was
  /// set successfully. If |value| represents simple data then the underlying
  /// data will be copied and modifications to |value| will not modify this
  /// object. If |value| represents complex data (binary, dictionary or list)
  /// then the underlying data will be referenced and modifications to |value|
  /// will modify this object.
  ///
  int(CEF_CALLBACK* set_value)(struct _cef_list_value_t* self,
                               size_t index,
                               struct _cef_value_t* value);

  ///
  /// Sets the value at the specified index as type null. Returns true (1) if
  /// the value was set successfully.
  ///
  int(CEF_CALLBACK* set_null)(struct _cef_list_value_t* self, size_t index);

  ///
  /// Sets the value at the specified index as type bool. Returns true (1) if
  /// the value was set successfully.
  ///
  int(CEF_CALLBACK* set_bool)(struct _cef_list_value_t* self,
                              size_t index,
                              int value);

  ///
  /// Sets the value at the specified index as type int. Returns true (1) if the
  /// value was set successfully.
  ///
  int(CEF_CALLBACK* set_int)(struct _cef_list_value_t* self,
                             size_t index,
                             int value);

  ///
  /// Sets the value at the specified index as type double. Returns true (1) if
  /// the value was set successfully.
  ///
  int(CEF_CALLBACK* set_double)(struct _cef_list_value_t* self,
                                size_t index,
                                double value);

  ///
  /// Sets the value at the specified index as type string. Returns true (1) if
  /// the value was set successfully.
  ///
  int(CEF_CALLBACK* set_string)(struct _cef_list_value_t* self,
                                size_t index,
                                const cef_string_t* value);

  ///
  /// Sets the value at the specified index as type binary. Returns true (1) if
  /// the value was set successfully. If |value| is currently owned by another
  /// object then the value will be copied and the |value| reference will not
  /// change. Otherwise, ownership will be transferred to this object and the
  /// |value| reference will be invalidated.
  ///
  int(CEF_CALLBACK* set_binary)(struct _cef_list_value_t* self,
                                size_t index,
                                struct _cef_binary_value_t* value);

  ///
  /// Sets the value at the specified index as type dict. Returns true (1) if
  /// the value was set successfully. If |value| is currently owned by another
  /// object then the value will be copied and the |value| reference will not
  /// change. Otherwise, ownership will be transferred to this object and the
  /// |value| reference will be invalidated.
  ///
  int(CEF_CALLBACK* set_dictionary)(struct _cef_list_value_t* self,
                                    size_t index,
                                    struct _cef_dictionary_value_t* value);

  ///
  /// Sets the value at the specified index as type list. Returns true (1) if
  /// the value was set successfully. If |value| is currently owned by another
  /// object then the value will be copied and the |value| reference will not
  /// change. Otherwise, ownership will be transferred to this object and the
  /// |value| reference will be invalidated.
  ///
  int(CEF_CALLBACK* set_list)(struct _cef_list_value_t* self,
                              size_t index,
                              struct _cef_list_value_t* value);
} cef_list_value_t;

///
/// Creates a new object that is not owned by any other object.
///
CEF_EXPORT cef_list_value_t* cef_list_value_create(void);

#ifdef __cplusplus
}
#endif

#endif  // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_