1 // Copyright (c) 2009 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_LIST_H_ 31 #define CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_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 maps are a set of key/value string pairs. 43 /// 44 typedef void* cef_string_list_t; 45 46 /// 47 // Allocate a new string map. 48 /// 49 CEF_EXPORT cef_string_list_t cef_string_list_alloc(); 50 51 /// 52 // Return the number of elements in the string list. 53 /// 54 CEF_EXPORT size_t cef_string_list_size(cef_string_list_t list); 55 56 /// 57 // Retrieve the value at the specified zero-based string list index. Returns 58 // true (1) if the value was successfully retrieved. 59 /// 60 CEF_EXPORT int cef_string_list_value(cef_string_list_t list, 61 size_t index, 62 cef_string_t* value); 63 64 /// 65 // Append a new value at the end of the string list. 66 /// 67 CEF_EXPORT void cef_string_list_append(cef_string_list_t list, 68 const cef_string_t* value); 69 70 /// 71 // Clear the string list. 72 /// 73 CEF_EXPORT void cef_string_list_clear(cef_string_list_t list); 74 75 /// 76 // Free the string list. 77 /// 78 CEF_EXPORT void cef_string_list_free(cef_string_list_t list); 79 80 /// 81 // Creates a copy of an existing string list. 82 /// 83 CEF_EXPORT cef_string_list_t cef_string_list_copy(cef_string_list_t list); 84 85 #ifdef __cplusplus 86 } 87 #endif 88 89 #endif // CEF_INCLUDE_INTERNAL_CEF_STRING_LIST_H_ 90