]> git.sesse.net Git - casparcg/blob - dependencies64/cef/include/internal/cef_string_multimap.h
* Merged html producer and updated to latest CEF version (does not have satisfactory...
[casparcg] / dependencies64 / cef / include / internal / cef_string_multimap.h
1 // Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
5 // met:
6 //
7 //    * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 //    * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
12 // distribution.
13 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14 // Framework nor the names of its contributors may be used to endorse
15 // or promote products derived from this software without specific prior
16 // written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30 #ifndef CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_
31 #define CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_
32 #pragma once
33
34 #include "include/internal/cef_export.h"
35 #include "include/internal/cef_string.h"
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 ///
42 // CEF string multimaps are a set of key/value string pairs.
43 // More than one value can be assigned to a single key.
44 ///
45 typedef void* cef_string_multimap_t;
46
47 ///
48 // Allocate a new string multimap.
49 ///
50 CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc();
51
52 ///
53 // Return the number of elements in the string multimap.
54 ///
55 CEF_EXPORT int cef_string_multimap_size(cef_string_multimap_t map);
56
57 ///
58 // Return the number of values with the specified key.
59 ///
60 CEF_EXPORT int cef_string_multimap_find_count(cef_string_multimap_t map,
61                                               const cef_string_t* key);
62
63 ///
64 // Return the value_index-th value with the specified key.
65 ///
66 CEF_EXPORT int cef_string_multimap_enumerate(cef_string_multimap_t map,
67                                              const cef_string_t* key,
68                                              int value_index,
69                                              cef_string_t* value);
70
71 ///
72 // Return the key at the specified zero-based string multimap index.
73 ///
74 CEF_EXPORT int cef_string_multimap_key(cef_string_multimap_t map, int index,
75                                        cef_string_t* key);
76
77 ///
78 // Return the value at the specified zero-based string multimap index.
79 ///
80 CEF_EXPORT int cef_string_multimap_value(cef_string_multimap_t map, int index,
81                                          cef_string_t* value);
82
83 ///
84 // Append a new key/value pair at the end of the string multimap.
85 ///
86 CEF_EXPORT int cef_string_multimap_append(cef_string_multimap_t map,
87                                           const cef_string_t* key,
88                                           const cef_string_t* value);
89
90 ///
91 // Clear the string multimap.
92 ///
93 CEF_EXPORT void cef_string_multimap_clear(cef_string_multimap_t map);
94
95 ///
96 // Free the string multimap.
97 ///
98 CEF_EXPORT void cef_string_multimap_free(cef_string_multimap_t map);
99
100
101 #ifdef __cplusplus
102 }
103 #endif
104
105 #endif  // CEF_INCLUDE_INTERNAL_CEF_STRING_MULTIMAP_H_