diff --git a/ports/cef/lib.rs b/ports/cef/lib.rs index ca96b5283e2..ae689e33ee1 100644 --- a/ports/cef/lib.rs +++ b/ports/cef/lib.rs @@ -52,6 +52,7 @@ pub mod request; pub mod string; pub mod string_list; pub mod string_map; +pub mod string_multimap; pub mod task; pub mod types; pub mod urlrequest; diff --git a/ports/cef/string_multimap.rs b/ports/cef/string_multimap.rs new file mode 100644 index 00000000000..35c848750e9 --- /dev/null +++ b/ports/cef/string_multimap.rs @@ -0,0 +1,22 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use eutil::slice_to_str; +use libc::{c_int}; +use std::collections::TreeMap; +use std::mem; +use std::string::String; +use string::{cef_string_userfree_utf8_alloc,cef_string_userfree_utf8_free,cef_string_utf8_set}; +use types::{cef_string_multimap_t,cef_string_t}; + + +//cef_string_multimap + +#[no_mangle] +pub extern "C" fn cef_string_multimap_alloc() -> *mut cef_string_multimap_t { + unsafe { + let smm: Box>> = box TreeMap::new(); + mem::transmute(smm) + } +} diff --git a/ports/cef/types.rs b/ports/cef/types.rs index 4484ffe7787..e1815f3f89d 100644 --- a/ports/cef/types.rs +++ b/ports/cef/types.rs @@ -5,10 +5,11 @@ use libc::{c_uint, c_ushort, c_int, c_double, size_t, c_void, c_longlong}; use libc::types::os::arch::c95::wchar_t; -pub enum cef_string_map_t {} -pub enum cef_string_list_t {} -pub enum cef_text_input_context_t {} -pub enum cef_event_handle_t {} +pub type cef_string_map_t = c_void; +pub type cef_string_multimap_t = c_void; +pub type cef_string_list_t = c_void; +pub type cef_text_input_context_t = c_void; +pub type cef_event_handle_t = c_void; //these all need to be done... pub enum cef_binary_value_val {}