summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-07-26 15:34:27 -0400
committerJoel Fischer <joeljfischer@gmail.com>2017-07-26 15:34:27 -0400
commitcc70dd18591f982c6da6eefed7fc893796a06d3b (patch)
tree7694ac4cbda7cb4164c2a34859ba0c265a999dca
parent5dd7c586f823727e6950749eea536939cb683b1e (diff)
downloadsdl_ios-cc70dd18591f982c6da6eefed7fc893796a06d3b.tar.gz
Update backing bson library
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj64
-rwxr-xr-xSmartDeviceLink/bson_array.c9
-rwxr-xr-xSmartDeviceLink/bson_array.h18
-rwxr-xr-xSmartDeviceLink/bson_object.c60
-rwxr-xr-xSmartDeviceLink/bson_object.h75
-rwxr-xr-xSmartDeviceLink/bson_util.h8
-rwxr-xr-xSmartDeviceLink/emhashmap.c18
-rwxr-xr-xSmartDeviceLink/emhashmap.h12
8 files changed, 163 insertions, 101 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 10da261ba..8569b1c7b 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -872,14 +872,6 @@
5DA3F3701BC4489A0026F2D0 /* SDLManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA3F36E1BC4489A0026F2D0 /* SDLManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
5DA3F3711BC4489A0026F2D0 /* SDLManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DA3F36F1BC4489A0026F2D0 /* SDLManager.m */; };
5DA49CCD1F1E653800E65FC5 /* emhashmap_LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5DA49CCA1F1E653800E65FC5 /* emhashmap_LICENSE.txt */; };
- 5DA49CD41F1E890500E65FC5 /* bson_array.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CCE1F1E890500E65FC5 /* bson_array.c */; };
- 5DA49CD51F1E890500E65FC5 /* bson_array.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CCF1F1E890500E65FC5 /* bson_array.h */; };
- 5DA49CD61F1E890500E65FC5 /* bson_object.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CD01F1E890500E65FC5 /* bson_object.c */; };
- 5DA49CD71F1E890500E65FC5 /* bson_object.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CD11F1E890500E65FC5 /* bson_object.h */; };
- 5DA49CD81F1E890500E65FC5 /* bson_util.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CD21F1E890500E65FC5 /* bson_util.c */; };
- 5DA49CD91F1E890500E65FC5 /* bson_util.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CD31F1E890500E65FC5 /* bson_util.h */; };
- 5DA49CDC1F1E890D00E65FC5 /* emhashmap.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CDA1F1E890D00E65FC5 /* emhashmap.c */; };
- 5DA49CDD1F1E890D00E65FC5 /* emhashmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CDB1F1E890D00E65FC5 /* emhashmap.h */; };
5DA49CE51F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA49CE31F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.h */; };
5DA49CE61F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CE41F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m */; };
5DAE06731BDEC6C000F9B498 /* SDLFileSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAE06721BDEC6C000F9B498 /* SDLFileSpec.m */; };
@@ -907,6 +899,14 @@
5DB9965D1F268F97002D8795 /* SDLControlFramePayloadVideoStartService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DB9965B1F268F97002D8795 /* SDLControlFramePayloadVideoStartService.m */; };
5DB996601F28C6ED002D8795 /* SDLControlFramePayloadVideoStartServiceAck.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DB9965E1F28C6ED002D8795 /* SDLControlFramePayloadVideoStartServiceAck.h */; };
5DB996611F28C6ED002D8795 /* SDLControlFramePayloadVideoStartServiceAck.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DB9965F1F28C6ED002D8795 /* SDLControlFramePayloadVideoStartServiceAck.m */; };
+ 5DB996681F2925B2002D8795 /* bson_array.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DB996621F2925B2002D8795 /* bson_array.c */; };
+ 5DB996691F2925B2002D8795 /* bson_array.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DB996631F2925B2002D8795 /* bson_array.h */; };
+ 5DB9966A1F2925B2002D8795 /* bson_object.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DB996641F2925B2002D8795 /* bson_object.c */; };
+ 5DB9966B1F2925B2002D8795 /* bson_object.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DB996651F2925B2002D8795 /* bson_object.h */; };
+ 5DB9966C1F2925B2002D8795 /* bson_util.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DB996661F2925B2002D8795 /* bson_util.c */; };
+ 5DB9966D1F2925B2002D8795 /* bson_util.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DB996671F2925B2002D8795 /* bson_util.h */; };
+ 5DB996701F2925C8002D8795 /* emhashmap.c in Sources */ = {isa = PBXBuildFile; fileRef = 5DB9966E1F2925C8002D8795 /* emhashmap.c */; };
+ 5DB996711F2925C8002D8795 /* emhashmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DB9966F1F2925C8002D8795 /* emhashmap.h */; };
5DBAE0AB1D3588AC00CE00BF /* SDLNotificationDispatcherSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DBAE0AA1D3588AC00CE00BF /* SDLNotificationDispatcherSpec.m */; };
5DBAE0AD1D368D1A00CE00BF /* SDLResponseDispatcherSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DBAE0AC1D368D1A00CE00BF /* SDLResponseDispatcherSpec.m */; };
5DC978261B7A38640012C2F1 /* SDLGlobalsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DC978251B7A38640012C2F1 /* SDLGlobalsSpec.m */; };
@@ -1958,14 +1958,6 @@
5DA3F36E1BC4489A0026F2D0 /* SDLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLManager.h; sourceTree = "<group>"; };
5DA3F36F1BC4489A0026F2D0 /* SDLManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLManager.m; sourceTree = "<group>"; };
5DA49CCA1F1E653800E65FC5 /* emhashmap_LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = emhashmap_LICENSE.txt; sourceTree = "<group>"; };
- 5DA49CCE1F1E890500E65FC5 /* bson_array.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bson_array.c; sourceTree = "<group>"; };
- 5DA49CCF1F1E890500E65FC5 /* bson_array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bson_array.h; sourceTree = "<group>"; };
- 5DA49CD01F1E890500E65FC5 /* bson_object.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bson_object.c; sourceTree = "<group>"; };
- 5DA49CD11F1E890500E65FC5 /* bson_object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bson_object.h; sourceTree = "<group>"; };
- 5DA49CD21F1E890500E65FC5 /* bson_util.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bson_util.c; sourceTree = "<group>"; };
- 5DA49CD31F1E890500E65FC5 /* bson_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bson_util.h; sourceTree = "<group>"; };
- 5DA49CDA1F1E890D00E65FC5 /* emhashmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = emhashmap.c; sourceTree = "<group>"; };
- 5DA49CDB1F1E890D00E65FC5 /* emhashmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = emhashmap.h; sourceTree = "<group>"; };
5DA49CE31F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLControlFramePayloadRPCStartService.h; sourceTree = "<group>"; };
5DA49CE41F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLControlFramePayloadRPCStartService.m; sourceTree = "<group>"; };
5DAE06721BDEC6C000F9B498 /* SDLFileSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLFileSpec.m; path = DevAPISpecs/SDLFileSpec.m; sourceTree = "<group>"; };
@@ -1994,6 +1986,14 @@
5DB9965B1F268F97002D8795 /* SDLControlFramePayloadVideoStartService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLControlFramePayloadVideoStartService.m; sourceTree = "<group>"; };
5DB9965E1F28C6ED002D8795 /* SDLControlFramePayloadVideoStartServiceAck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLControlFramePayloadVideoStartServiceAck.h; sourceTree = "<group>"; };
5DB9965F1F28C6ED002D8795 /* SDLControlFramePayloadVideoStartServiceAck.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLControlFramePayloadVideoStartServiceAck.m; sourceTree = "<group>"; };
+ 5DB996621F2925B2002D8795 /* bson_array.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bson_array.c; sourceTree = "<group>"; };
+ 5DB996631F2925B2002D8795 /* bson_array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bson_array.h; sourceTree = "<group>"; };
+ 5DB996641F2925B2002D8795 /* bson_object.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bson_object.c; sourceTree = "<group>"; };
+ 5DB996651F2925B2002D8795 /* bson_object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bson_object.h; sourceTree = "<group>"; };
+ 5DB996661F2925B2002D8795 /* bson_util.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bson_util.c; sourceTree = "<group>"; };
+ 5DB996671F2925B2002D8795 /* bson_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bson_util.h; sourceTree = "<group>"; };
+ 5DB9966E1F2925C8002D8795 /* emhashmap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = emhashmap.c; sourceTree = "<group>"; };
+ 5DB9966F1F2925C8002D8795 /* emhashmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = emhashmap.h; sourceTree = "<group>"; };
5DBAE0AA1D3588AC00CE00BF /* SDLNotificationDispatcherSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLNotificationDispatcherSpec.m; path = DevAPISpecs/SDLNotificationDispatcherSpec.m; sourceTree = "<group>"; };
5DBAE0AC1D368D1A00CE00BF /* SDLResponseDispatcherSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLResponseDispatcherSpec.m; path = DevAPISpecs/SDLResponseDispatcherSpec.m; sourceTree = "<group>"; };
5DC978251B7A38640012C2F1 /* SDLGlobalsSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLGlobalsSpec.m; path = UtilitiesSpecs/SDLGlobalsSpec.m; sourceTree = "<group>"; };
@@ -3733,12 +3733,12 @@
5DA49C8C1F1E549000E65FC5 /* BSON */ = {
isa = PBXGroup;
children = (
- 5DA49CCF1F1E890500E65FC5 /* bson_array.h */,
- 5DA49CCE1F1E890500E65FC5 /* bson_array.c */,
- 5DA49CD11F1E890500E65FC5 /* bson_object.h */,
- 5DA49CD01F1E890500E65FC5 /* bson_object.c */,
- 5DA49CD31F1E890500E65FC5 /* bson_util.h */,
- 5DA49CD21F1E890500E65FC5 /* bson_util.c */,
+ 5DB996621F2925B2002D8795 /* bson_array.c */,
+ 5DB996631F2925B2002D8795 /* bson_array.h */,
+ 5DB996641F2925B2002D8795 /* bson_object.c */,
+ 5DB996651F2925B2002D8795 /* bson_object.h */,
+ 5DB996661F2925B2002D8795 /* bson_util.c */,
+ 5DB996671F2925B2002D8795 /* bson_util.h */,
5DA49CB51F1E64BB00E65FC5 /* emhashmap */,
);
name = BSON;
@@ -3747,8 +3747,8 @@
5DA49CB51F1E64BB00E65FC5 /* emhashmap */ = {
isa = PBXGroup;
children = (
- 5DA49CDB1F1E890D00E65FC5 /* emhashmap.h */,
- 5DA49CDA1F1E890D00E65FC5 /* emhashmap.c */,
+ 5DB9966E1F2925C8002D8795 /* emhashmap.c */,
+ 5DB9966F1F2925C8002D8795 /* emhashmap.h */,
5DA49CCA1F1E653800E65FC5 /* emhashmap_LICENSE.txt */,
);
name = emhashmap;
@@ -4105,6 +4105,7 @@
5DE5ABB81B0E38C90067BB02 /* SDLSystemRequestResponse.h in Headers */,
5D61FCA51A84238C00846EE7 /* SDLEndAudioPassThruResponse.h in Headers */,
5D3E48CB1D7722FE0000BFEF /* NSBundle+SDLBundle.h in Headers */,
+ 5DB9966D1F2925B2002D8795 /* bson_util.h in Headers */,
5D61FD851A84238C00846EE7 /* SDLSetDisplayLayoutResponse.h in Headers */,
5D61FD751A84238C00846EE7 /* SDLRPCResponse.h in Headers */,
5D61FC901A84238C00846EE7 /* SDLDisplayCapabilities.h in Headers */,
@@ -4149,6 +4150,7 @@
5D61FE111A84238C00846EE7 /* SDLWarningLightStatus.h in Headers */,
5D61FC7A1A84238C00846EE7 /* SDLDeleteInteractionChoiceSet.h in Headers */,
5D61FC3B1A84238C00846EE7 /* SDLAlertManeuverResponse.h in Headers */,
+ 5DB996711F2925C8002D8795 /* emhashmap.h in Headers */,
5DB9964E1F26886C002D8795 /* SDLControlFramePayloadEndService.h in Headers */,
5D61FC6F1A84238C00846EE7 /* SDLDebugTool.h in Headers */,
5D61FDB71A84238C00846EE7 /* SDLSyncPData.h in Headers */,
@@ -4177,6 +4179,7 @@
5D61FC4B1A84238C00846EE7 /* SDLBeltStatus.h in Headers */,
DAC5726B1D10D5FC0004288B /* dispatch_timer.h in Headers */,
DA9F7E991DCC052C00ACAE48 /* SDLLocationCoordinate.h in Headers */,
+ 5DB9966B1F2925B2002D8795 /* bson_object.h in Headers */,
5D61FC351A84238C00846EE7 /* SDLAirbagStatus.h in Headers */,
5D61FC8A1A84238C00846EE7 /* SDLDiagnosticMessageResponse.h in Headers */,
5D61FC2D1A84238C00846EE7 /* SDLAddCommand.h in Headers */,
@@ -4237,6 +4240,7 @@
5D53C46D1B7A99B9003526EA /* SDLStreamingMediaManager.h in Headers */,
5D61FD0F1A84238C00846EE7 /* SDLOnHMIStatus.h in Headers */,
5D61FD5F1A84238C00846EE7 /* SDLRegisterAppInterfaceResponse.h in Headers */,
+ 5DB996691F2925B2002D8795 /* bson_array.h in Headers */,
5D61FD191A84238C00846EE7 /* SDLOnSyncPData.h in Headers */,
5D61FE091A84238C00846EE7 /* SDLVehicleDataType.h in Headers */,
5DCC19A01B8221F3004FFAD9 /* SDLURLSession.h in Headers */,
@@ -4317,7 +4321,6 @@
5D61FCD11A84238C00846EE7 /* SDLImageFieldName.h in Headers */,
5DCF76F91ACDD7CD00BB647B /* SDLSendLocationResponse.h in Headers */,
5D61FD391A84238C00846EE7 /* SDLPrerecordedSpeech.h in Headers */,
- 5DA49CDD1F1E890D00E65FC5 /* emhashmap.h in Headers */,
5D61FC671A84238C00846EE7 /* SDLComponentVolumeStatus.h in Headers */,
5D61FE0F1A84238C00846EE7 /* SDLVrHelpItem.h in Headers */,
5D60088A1BE3ED540094A505 /* SDLStateMachine.h in Headers */,
@@ -4394,7 +4397,6 @@
5D61FD471A84238C00846EE7 /* SDLProtocolListener.h in Headers */,
5D61FCA01A84238C00846EE7 /* SDLEncodedSyncPDataResponse.h in Headers */,
5D61FD271A84238C00846EE7 /* SDLPerformAudioPassThruResponse.h in Headers */,
- 5DA49CD71F1E890500E65FC5 /* bson_object.h in Headers */,
5D61FD251A84238C00846EE7 /* SDLPerformAudioPassThru.h in Headers */,
332A91501CED9CF10043824C /* SDLAppInfo.h in Headers */,
5D61FDA71A84238C00846EE7 /* SDLSpeakResponse.h in Headers */,
@@ -4404,7 +4406,6 @@
5D61FDA31A84238C00846EE7 /* SDLSoftButtonType.h in Headers */,
5D61FC431A84238C00846EE7 /* SDLAppInterfaceUnregisteredReason.h in Headers */,
5D61FA211A84237100846EE7 /* SmartDeviceLink.h in Headers */,
- 5DA49CD51F1E890500E65FC5 /* bson_array.h in Headers */,
5D61FD711A84238C00846EE7 /* SDLRPCRequest.h in Headers */,
5D61FD6D1A84238C00846EE7 /* SDLRPCNotification.h in Headers */,
5D61FD691A84238C00846EE7 /* SDLRPCMessage.h in Headers */,
@@ -4431,7 +4432,6 @@
5D61FCFD1A84238C00846EE7 /* SDLObjectWithPriority.h in Headers */,
DAC5726C1D11B4840004288B /* SDLTouchManagerDelegate.h in Headers */,
5D61FD3F1A84238C00846EE7 /* SDLPrioritizedObjectCollection.h in Headers */,
- 5DA49CD91F1E890500E65FC5 /* bson_util.h in Headers */,
5D61FCBF1A84238C00846EE7 /* SDLHexUtility.h in Headers */,
5D00AC6B1F141339004000D9 /* SDLSystemCapability.h in Headers */,
5D61FCA21A84238C00846EE7 /* SDLEncoder.h in Headers */,
@@ -4700,7 +4700,6 @@
5D61FC8F1A84238C00846EE7 /* SDLDimension.m in Sources */,
5D61FC9B1A84238C00846EE7 /* SDLEmergencyEvent.m in Sources */,
5D61FDFE1A84238C00846EE7 /* SDLVehicleDataActiveStatus.m in Sources */,
- 5DA49CD81F1E890500E65FC5 /* bson_util.c in Sources */,
5D61FCD01A84238C00846EE7 /* SDLImageField.m in Sources */,
5D61FC3C1A84238C00846EE7 /* SDLAlertManeuverResponse.m in Sources */,
5D61FC6A1A84238C00846EE7 /* SDLConsoleController.m in Sources */,
@@ -4750,6 +4749,7 @@
5D61FDA41A84238C00846EE7 /* SDLSoftButtonType.m in Sources */,
5D00AC6C1F141339004000D9 /* SDLSystemCapability.m in Sources */,
5D61FC521A84238C00846EE7 /* SDLButtonCapabilities.m in Sources */,
+ 5DB9966C1F2925B2002D8795 /* bson_util.c in Sources */,
5D61FC791A84238C00846EE7 /* SDLDeleteFileResponse.m in Sources */,
5D3E48801D6F88A30000BFEF /* SDLRPCNotificationNotification.m in Sources */,
DAC572581D1067270004288B /* SDLTouchManager.m in Sources */,
@@ -4762,7 +4762,6 @@
5D61FD3C1A84238C00846EE7 /* SDLPresetBankCapabilities.m in Sources */,
5D4631151F2136B60092EFDC /* SDLControlFramePayloadNak.m in Sources */,
5D61FDB81A84238C00846EE7 /* SDLSyncPData.m in Sources */,
- 5DA49CD61F1E890500E65FC5 /* bson_object.c in Sources */,
5D61FD221A84238C00846EE7 /* SDLOnVehicleData.m in Sources */,
5D61FCD41A84238C00846EE7 /* SDLImageResolution.m in Sources */,
5D61FDF41A84238C00846EE7 /* SDLUpdateTurnListResponse.m in Sources */,
@@ -4872,6 +4871,7 @@
5D61FC851A84238C00846EE7 /* SDLDeviceLevelStatus.m in Sources */,
5D1665AB1CF5F7D000CC4CA1 /* (null) in Sources */,
5D61FD1E1A84238C00846EE7 /* SDLOnTBTClientState.m in Sources */,
+ 5DB996701F2925C8002D8795 /* emhashmap.c in Sources */,
DA9F7E641DCBFAC800ACAE48 /* SDLDateTime.m in Sources */,
5D61FD581A84238C00846EE7 /* SDLPutFileResponse.m in Sources */,
5D61FCB21A84238C00846EE7 /* SDLGetDTCs.m in Sources */,
@@ -4907,9 +4907,11 @@
5D61FCD61A84238C00846EE7 /* SDLImageType.m in Sources */,
5D4D67AD1D2ED37A00468B4A /* SDLNotificationDispatcher.m in Sources */,
DA9F7E9C1DCC052C00ACAE48 /* SDLLocationDetails.m in Sources */,
+ 5DB996681F2925B2002D8795 /* bson_array.c in Sources */,
5D61FD7A1A84238C00846EE7 /* SDLScreenParams.m in Sources */,
5D61FC831A84238C00846EE7 /* SDLDeviceInfo.m in Sources */,
5D7F87EC1CE3C1A1002DD7C4 /* SDLDeleteFileOperation.m in Sources */,
+ 5DB9966A1F2925B2002D8795 /* bson_object.c in Sources */,
97E26DED1E807AD70074A3C7 /* SDLMutableDataQueue.m in Sources */,
5D61FD641A84238C00846EE7 /* SDLResetGlobalProperties.m in Sources */,
5D60088B1BE3ED540094A505 /* SDLStateMachine.m in Sources */,
@@ -4924,7 +4926,6 @@
5D61FDE41A84238C00846EE7 /* SDLUnregisterAppInterface.m in Sources */,
5D61FC361A84238C00846EE7 /* SDLAirbagStatus.m in Sources */,
5D61FD7E1A84238C00846EE7 /* SDLScrollableMessageResponse.m in Sources */,
- 5DA49CD41F1E890500E65FC5 /* bson_array.c in Sources */,
5D61FD3A1A84238C00846EE7 /* SDLPrerecordedSpeech.m in Sources */,
5D61FCA11A84238C00846EE7 /* SDLEncodedSyncPDataResponse.m in Sources */,
5D61FD401A84238C00846EE7 /* SDLPrioritizedObjectCollection.m in Sources */,
@@ -4943,7 +4944,6 @@
5D8204321BD001C700D0A41B /* SDLArtwork.m in Sources */,
5D61FC2C1A84238C00846EE7 /* SDLAbstractTransport.m in Sources */,
5D61FD8E1A84238C00846EE7 /* SDLSetMediaClockTimerResponse.m in Sources */,
- 5DA49CDC1F1E890D00E65FC5 /* emhashmap.c in Sources */,
5D61FD721A84238C00846EE7 /* SDLRPCRequest.m in Sources */,
5D61FDF01A84238C00846EE7 /* SDLUpdateMode.m in Sources */,
5D61FC931A84238C00846EE7 /* SDLDisplayType.m in Sources */,
diff --git a/SmartDeviceLink/bson_array.c b/SmartDeviceLink/bson_array.c
index be76b0519..edac6a1f0 100755
--- a/SmartDeviceLink/bson_array.c
+++ b/SmartDeviceLink/bson_array.c
@@ -344,15 +344,6 @@ bool bson_array_add_double(BsonArray *array, double value) {
SIZE_DOUBLE);
}
-/*
- @brief Retrieve the object at a specified index
-
- @param array - The array to be accessed
- @param index - The index of the object within the array
-
- @return - The BSON element at the given index if it exists,
- NULL if the index is out of bounds
-*/
BsonElement *bson_array_get(BsonArray *array, size_t index) {
return (index >= array->count) ? NULL : array->elements[index];
}
diff --git a/SmartDeviceLink/bson_array.h b/SmartDeviceLink/bson_array.h
index 82dd0808f..a61498f17 100755
--- a/SmartDeviceLink/bson_array.h
+++ b/SmartDeviceLink/bson_array.h
@@ -20,6 +20,10 @@ struct BsonArray {
};
typedef struct BsonArray BsonArray;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
@brief Initalize BSON Array
@@ -139,6 +143,16 @@ bool bson_array_add_bool(BsonArray *array, bson_boolean value);
bool bson_array_add_double(BsonArray *array, double value);
/*
+ @brief Retrieve the object at a specified index
+
+ @param array - The array to be accessed
+ @param index - The index of the object within the array
+
+ @return - The BSON element at the given index if it exists,
+ NULL if the index is out of bounds
+*/
+BsonElement *bson_array_get(BsonArray *array, size_t index);
+/*
@brief Retrieve the BSON object at a specified index in an array
@param array - The array to be accessed
@@ -209,4 +223,8 @@ bson_boolean bson_array_get_bool(BsonArray *array, size_t index);
*/
double bson_array_get_double(BsonArray *array, size_t index);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/SmartDeviceLink/bson_object.c b/SmartDeviceLink/bson_object.c
index b9f5d69b9..b51778902 100755
--- a/SmartDeviceLink/bson_object.c
+++ b/SmartDeviceLink/bson_object.c
@@ -1,7 +1,7 @@
#include "bson_object.h"
#define DEFAULT_MAP_SIZE 32
-size_t hash_function(char* key, size_t maxValue) {
+size_t hash_function(const char* key, size_t maxValue) {
size_t keyLength = strlen(key);
size_t hash = 0;
int i;
@@ -283,7 +283,7 @@ char *bson_object_to_string(BsonObject *obj, char *out) {
return out;
}
-bool bson_object_put_element(BsonObject *obj, char *key, BsonElement *element, size_t allocSize) {
+bool bson_object_put_element(BsonObject *obj, const char *key, BsonElement *element, size_t allocSize) {
BsonElement *allocElement = malloc(sizeof(BsonElement));
allocElement->type = element->type;
allocElement->size = element->size;
@@ -303,19 +303,7 @@ bool bson_object_put_element(BsonObject *obj, char *key, BsonElement *element, s
return emhashmap_put(&obj->data, key, (void *)allocElement);
}
-/*
- @brief Put a new element into a given object
-
- @param obj - The object to be modified
- @param key - The key used to reference the new element
- @param type - The type of the element to be added
- @param value - The value of the element to be added
- @param allocSize - The size, in bytes, to be allocated for the element
- @param elementSize - The size, in bytes, of the element when converted to BSON format
-
- @return - true if the addition was successful, false if not
-*/
-bool bson_object_put(BsonObject *obj, char *key, element_type type, void *value, size_t allocSize, size_t elementSize) {
+bool bson_object_put(BsonObject *obj, const char *key, element_type type, void *value, size_t allocSize, size_t elementSize) {
BsonElement element;
element.type = type;
element.value = value;
@@ -323,82 +311,94 @@ bool bson_object_put(BsonObject *obj, char *key, element_type type, void *value,
return bson_object_put_element(obj, key, &element, allocSize);
}
-bool bson_object_put_object(BsonObject *obj, char *key, BsonObject *value) {
+bool bson_object_put_object(BsonObject *obj, const char *key, BsonObject *value) {
return bson_object_put(obj, key, TYPE_DOCUMENT, value, sizeof(BsonObject), 0);
}
-bool bson_object_put_array(BsonObject *obj, char *key, BsonArray *value) {
+bool bson_object_put_array(BsonObject *obj, const char *key, BsonArray *value) {
return bson_object_put(obj, key, TYPE_ARRAY, value, sizeof(BsonArray), 0);
}
-bool bson_object_put_int32(BsonObject *obj, char *key, int32_t value) {
+bool bson_object_put_int32(BsonObject *obj, const char *key, int32_t value) {
return bson_object_put(obj, key, TYPE_INT32, &value, sizeof(int32_t),
SIZE_INT32);
}
-bool bson_object_put_int64(BsonObject *obj, char *key, int64_t value) {
+bool bson_object_put_int64(BsonObject *obj, const char *key, int64_t value) {
return bson_object_put(obj, key, TYPE_INT64, &value, sizeof(int64_t),
SIZE_INT64);
}
-bool bson_object_put_string(BsonObject *obj, char *key, char *value) {
+bool bson_object_put_string(BsonObject *obj, const char *key, char *value) {
return bson_object_put(obj, key, TYPE_STRING, value, (strlen(value) + 1) * sizeof(char),
strlen(value) + STRING_OVERHEAD_BYTES);
}
-bool bson_object_put_bool(BsonObject *obj, char *key, bson_boolean value) {
+bool bson_object_put_bool(BsonObject *obj, const char *key, bson_boolean value) {
return bson_object_put(obj, key, TYPE_BOOLEAN, &value, sizeof(bson_boolean),
SIZE_BOOLEAN);
}
-bool bson_object_put_double(BsonObject *obj, char *key, double value) {
+bool bson_object_put_double(BsonObject *obj, const char *key, double value) {
return bson_object_put(obj, key, TYPE_DOUBLE, &value, sizeof(double),
SIZE_DOUBLE);
}
-BsonElement *bson_object_get(BsonObject *obj, char *key) {
+BsonElement *bson_object_get(BsonObject *obj, const char *key) {
MapEntry *entry = emhashmap_get(&obj->data, key);
return (entry == NULL) ? NULL : entry->value;
}
-BsonObject *bson_object_get_object(BsonObject *obj, char *key) {
+BsonObject *bson_object_get_object(BsonObject *obj, const char *key) {
BsonElement *element = bson_object_get(obj, key);
return (element == NULL || element->type != TYPE_DOCUMENT) ?
NULL : (BsonObject *)element->value;
}
-BsonArray *bson_object_get_array(BsonObject *obj, char *key) {
+BsonArray *bson_object_get_array(BsonObject *obj, const char *key) {
BsonElement *element = bson_object_get(obj, key);
return (element == NULL || element->type != TYPE_ARRAY) ?
NULL : (BsonArray *)element->value;
}
-int32_t bson_object_get_int32(BsonObject *obj, char *key) {
+int32_t bson_object_get_int32(BsonObject *obj, const char *key) {
BsonElement *element = bson_object_get(obj, key);
return (element == NULL || element->type != TYPE_INT32) ?
-1 : *(int32_t *)element->value;
}
-int64_t bson_object_get_int64(BsonObject *obj, char *key) {
+int64_t bson_object_get_int64(BsonObject *obj, const char *key) {
BsonElement *element = bson_object_get(obj, key);
return (element == NULL || element->type != TYPE_INT64) ?
-1 : *(int64_t *)element->value;
}
-char *bson_object_get_string(BsonObject *obj, char *key) {
+char *bson_object_get_string(BsonObject *obj, const char *key) {
BsonElement *element = bson_object_get(obj, key);
return (element == NULL || element->type != TYPE_STRING) ?
NULL : (char *)element->value;
}
-bson_boolean bson_object_get_bool(BsonObject *obj, char *key) {
+bson_boolean bson_object_get_bool(BsonObject *obj, const char *key) {
BsonElement *element = bson_object_get(obj, key);
return (element == NULL || element->type != TYPE_BOOLEAN) ?
BOOLEAN_INVALID : *(bson_boolean *)element->value;
}
-double bson_object_get_double(BsonObject *obj, char *key) {
+double bson_object_get_double(BsonObject *obj, const char *key) {
BsonElement *element = bson_object_get(obj, key);
return (element == NULL || element->type != TYPE_DOUBLE) ?
-1 : *(double *)element->value;
}
+
+MapIterator bson_object_iterator(BsonObject *obj) {
+ return emhashmap_iterator(&obj->data);
+}
+
+BsonObjectEntry bson_object_iterator_next(MapIterator *iterator) {
+ MapEntry *entry = emhashmap_iterator_next(iterator);
+ BsonObjectEntry bsonEntry;
+ strncpy(bsonEntry.key, entry->key, 255);
+ bsonEntry.element = (BsonElement *)entry->value;
+ return bsonEntry;
+} \ No newline at end of file
diff --git a/SmartDeviceLink/bson_object.h b/SmartDeviceLink/bson_object.h
index ebac82e51..d87f38348 100755
--- a/SmartDeviceLink/bson_object.h
+++ b/SmartDeviceLink/bson_object.h
@@ -21,7 +21,7 @@ typedef struct BsonObject BsonObject;
struct BsonElement {
//The value of this element
- void* value;
+ void *value;
//The data type of this element
element_type type;
//Size of the element in bytes when converted to BSON
@@ -30,6 +30,16 @@ struct BsonElement {
};
typedef struct BsonElement BsonElement;
+struct BsonObjectEntry {
+ char key[255];
+ BsonElement *element;
+};
+typedef struct BsonObjectEntry BsonObjectEntry;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
@brief Initalize BSON Object
@@ -104,7 +114,7 @@ char *bson_object_to_string(BsonObject *obj, char *out);
@return - true if the value was set successfully, false if not
*/
-bool bson_object_put_object(BsonObject *obj, char *key, BsonObject *value);
+bool bson_object_put_object(BsonObject *obj, const char *key, BsonObject *value);
/*
@brief Put a new BSON array into a given object
@@ -116,7 +126,7 @@ bool bson_object_put_object(BsonObject *obj, char *key, BsonObject *value);
@return - true if the value was set successfully, false if not
*/
-bool bson_object_put_array(BsonObject *obj, char *key, BsonArray *value);
+bool bson_object_put_array(BsonObject *obj, const char *key, BsonArray *value);
/*
@brief Put a new 32-bit integer value into a given object
@@ -128,7 +138,7 @@ bool bson_object_put_array(BsonObject *obj, char *key, BsonArray *value);
@return - true if the value was set successfully, false if not
*/
-bool bson_object_put_int32(BsonObject *obj, char *key, int32_t value);
+bool bson_object_put_int32(BsonObject *obj, const char *key, int32_t value);
/*
@brief Put a new 64-bit integer value into a given object
@@ -140,7 +150,7 @@ bool bson_object_put_int32(BsonObject *obj, char *key, int32_t value);
@return - true if the value was set successfully, false if not
*/
-bool bson_object_put_int64(BsonObject *obj, char *key, int64_t value);
+bool bson_object_put_int64(BsonObject *obj, const char *key, int64_t value);
/*
@brief Put a new string value into a given object
@@ -152,7 +162,7 @@ bool bson_object_put_int64(BsonObject *obj, char *key, int64_t value);
@return - true if the value was set successfully, false if not
*/
-bool bson_object_put_string(BsonObject *obj, char *key, char *value);
+bool bson_object_put_string(BsonObject *obj, const char *key, char *value);
/*
@brief Put a new boolean value into a given object
@@ -164,7 +174,7 @@ bool bson_object_put_string(BsonObject *obj, char *key, char *value);
@return - true if the value was set successfully, false if not
*/
-bool bson_object_put_bool(BsonObject *obj, char *key, bson_boolean value);
+bool bson_object_put_bool(BsonObject *obj, const char *key, bson_boolean value);
/*
@brief Put a new floating-point value into a given object
@@ -176,8 +186,21 @@ bool bson_object_put_bool(BsonObject *obj, char *key, bson_boolean value);
@return - true if the value was set successfully, false if not
*/
-bool bson_object_put_double(BsonObject *obj, char *key, double value);
+bool bson_object_put_double(BsonObject *obj, const char *key, double value);
+
+/*
+ @brief Put a new element into a given object
+
+ @param obj - The object to be modified
+ @param key - The key used to reference the new element
+ @param type - The type of the element to be added
+ @param value - The value of the element to be added
+ @param allocSize - The size, in bytes, to be allocated for the element
+ @param elementSize - The size, in bytes, of the element when converted to BSON format
+ @return - true if the addition was successful, false if not
+*/
+BsonElement *bson_object_get(BsonObject *obj, const char *key);
/*
@brief Retrieve the BSON object to which the specified key is mapped in an object
@@ -186,7 +209,7 @@ bool bson_object_put_double(BsonObject *obj, char *key, double value);
@return - The pointer to the BSON object mapped to the given key if it exists, NULL otherwise
*/
-BsonObject *bson_object_get_object(BsonObject *obj, char *key);
+BsonObject *bson_object_get_object(BsonObject *obj, const char *key);
/*
@brief Retrieve the BSON array to which the specified key is mapped in an object
@@ -195,7 +218,7 @@ BsonObject *bson_object_get_object(BsonObject *obj, char *key);
@return - The pointer to the BSON array mapped to the given key if it exists, NULL otherwise
*/
-BsonArray *bson_object_get_array(BsonObject *obj, char *key);
+BsonArray *bson_object_get_array(BsonObject *obj, const char *key);
/*
@brief Retrieve the 32-bit integer value to which the specified key is mapped in an object
@@ -204,7 +227,7 @@ BsonArray *bson_object_get_array(BsonObject *obj, char *key);
@return - The 32-bit integer value mapped to the given key if it exists, NULL otherwise
*/
-int32_t bson_object_get_int32(BsonObject *obj, char *key);
+int32_t bson_object_get_int32(BsonObject *obj, const char *key);
/*
@brief Retrieve the 64-bit integer value to which the specified key is mapped in an object
@@ -213,7 +236,7 @@ int32_t bson_object_get_int32(BsonObject *obj, char *key);
@return - The 64-bit integer value mapped to the given key if it exists, NULL otherwise
*/
-int64_t bson_object_get_int64(BsonObject *obj, char *key);
+int64_t bson_object_get_int64(BsonObject *obj, const char *key);
/*
@brief Retrieve the string value to which the specified key is mapped in an object
@@ -222,7 +245,7 @@ int64_t bson_object_get_int64(BsonObject *obj, char *key);
@return - The string value mapped to the given key if it exists, NULL otherwise
*/
-char *bson_object_get_string(BsonObject *obj, char *key);
+char *bson_object_get_string(BsonObject *obj, const char *key);
/*
@brief Retrieve the boolean value to which the specified key is mapped in an object
@@ -231,7 +254,7 @@ char *bson_object_get_string(BsonObject *obj, char *key);
@return - The boolean value mapped to the given key if it exists, NULL otherwise
*/
-bson_boolean bson_object_get_bool(BsonObject *obj, char *key);
+bson_boolean bson_object_get_bool(BsonObject *obj, const char *key);
/*
@brief Retrieve the floating-point value to which the specified key is mapped in an object
@@ -240,6 +263,28 @@ bson_boolean bson_object_get_bool(BsonObject *obj, char *key);
@return - The floating-point value mapped to the given key if it exists, NULL otherwise
*/
-double bson_object_get_double(BsonObject *obj, char *key);
+double bson_object_get_double(BsonObject *obj, const char *key);
+
+/*
+ @brief Get an iterator for a given BSON object
+
+ @param obj - The object from which the iterator is created
+
+ @return - The iterator
+*/
+MapIterator bson_object_iterator(BsonObject *obj);
+/*
+ @brief Get the next value from an object iterator
+
+ @param iterator - The iterator to be advanced
+
+ @return - The next BSON object entry in the object if it exists,
+ NULL if the iterator has moved past the end of the entry list
+*/
+BsonObjectEntry bson_object_iterator_next(MapIterator *iterator);
+
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/SmartDeviceLink/bson_util.h b/SmartDeviceLink/bson_util.h
index bcde9f413..1f9133d6e 100755
--- a/SmartDeviceLink/bson_util.h
+++ b/SmartDeviceLink/bson_util.h
@@ -58,6 +58,10 @@ enum bson_boolean {
};
typedef enum bson_boolean bson_boolean;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
@brief Write a little endian 32-bit integer value to a given buffer
@@ -172,4 +176,8 @@ size_t array_key_size(size_t index);
*/
size_t digits(size_t value);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/SmartDeviceLink/emhashmap.c b/SmartDeviceLink/emhashmap.c
index 6f6b7224b..467159913 100755
--- a/SmartDeviceLink/emhashmap.c
+++ b/SmartDeviceLink/emhashmap.c
@@ -6,7 +6,7 @@
#include <stdbool.h>
#include <string.h>
-static MapBucketList* find_bucket(HashMap* map, char* key) {
+static MapBucketList* find_bucket(HashMap* map, const char* key) {
MapBucketList* bucket = NULL;
if(map != NULL && map->buckets != NULL) {
@@ -27,7 +27,7 @@ void emhashmap_deinitialize(HashMap* map) {
}
}
-bool emhashmap_initialize(HashMap* map, int capacity, float load_factor, size_t (*hash_function)(char*, size_t)) {
+bool emhashmap_initialize(HashMap* map, int capacity, float load_factor, size_t (*hash_function)(const char*, size_t)) {
map->bucket_count = ((int)(capacity / load_factor) + 1);
map->capacity = capacity;
map->entries = (MapEntry*) malloc(sizeof(MapEntry) * map->capacity);
@@ -48,7 +48,7 @@ bool emhashmap_initialize(HashMap* map, int capacity, float load_factor, size_t
return map->buckets != NULL;
}
-MapEntry* emhashmap_get(HashMap* map, char* key) {
+MapEntry* emhashmap_get(HashMap* map, const char* key) {
MapBucketList* bucket = find_bucket(map, key);
MapEntry* entry;
@@ -60,11 +60,11 @@ MapEntry* emhashmap_get(HashMap* map, char* key) {
return NULL;
}
-bool emhashmap_contains(HashMap* map, char* key) {
+bool emhashmap_contains(HashMap* map, const char* key) {
return emhashmap_get(map, key) != NULL;
}
-bool emhashmap_put(HashMap* map, char* key, void* value) {
+bool emhashmap_put(HashMap* map, const char* key, void* value) {
MapBucketList* bucket = find_bucket(map, key);
MapEntry* entry, *matching_entry = NULL;
@@ -91,7 +91,7 @@ bool emhashmap_put(HashMap* map, char* key, void* value) {
return result;
}
-void* emhashmap_remove(HashMap* map, char* key) {
+void* emhashmap_remove(HashMap* map, const char* key) {
MapBucketList* bucket = find_bucket(map, key);
MapEntry* entry, *matching_entry = NULL;
@@ -144,10 +144,10 @@ MapEntry* emhashmap_iterator_next(MapIterator* iterator) {
}
if(iterator->current_entry == NULL) {
- do {
+ while (iterator->current_entry == NULL &&
+ iterator->current_bucket < iterator->map->bucket_count) {
iterator->current_entry = LIST_FIRST(&iterator->map->buckets[iterator->current_bucket++]);
- } while(iterator->current_entry == NULL &&
- iterator->current_bucket < iterator->map->bucket_count - 1);
+ }
}
return iterator->current_entry;
}
diff --git a/SmartDeviceLink/emhashmap.h b/SmartDeviceLink/emhashmap.h
index c477a7a9c..7d7f28721 100755
--- a/SmartDeviceLink/emhashmap.h
+++ b/SmartDeviceLink/emhashmap.h
@@ -41,7 +41,7 @@ struct HashMap {
MapBucketList* buckets;
MapEntry* entries;
MapBucketList free_list;
- size_t (*hash)(char*, size_t);
+ size_t (*hash)(const char*, size_t);
};
typedef struct HashMap HashMap;
@@ -66,7 +66,7 @@ typedef struct MapIterator MapIterator;
* Returns true if the map was initialized, successfully, false if space could
* not be allocated for the buckets or entries.
*/
-bool emhashmap_initialize(HashMap* map, int capacity, float load_factor, size_t (*hash_function)(char*, size_t));
+bool emhashmap_initialize(HashMap* map, int capacity, float load_factor, size_t (*hash_function)(const char*, size_t));
/* Public: De-initialize a map, freeing memory for the buckets and entries.
*
@@ -85,7 +85,7 @@ void emhashmap_deinitialize(HashMap* map);
*
* Returns the MapEntry if found, otherwise NULL.
*/
-MapEntry* emhashmap_get(HashMap* map, char* key);
+MapEntry* emhashmap_get(HashMap* map, const char* key);
/* Public: Check if the given key is in the map.
*
@@ -94,7 +94,7 @@ MapEntry* emhashmap_get(HashMap* map, char* key);
*
* Returns true if the key is in the map.
*/
-bool emhashmap_contains(HashMap* map, char* key);
+bool emhashmap_contains(HashMap* map, const char* key);
/* Public: Put the value in the map with the given key.
*
@@ -104,7 +104,7 @@ bool emhashmap_contains(HashMap* map, char* key);
* Returns true if there was space in the map and the key-value pair was added
* successfully. Returns false if the map is full.
*/
-bool emhashmap_put(HashMap* map, char* key, void* value);
+bool emhashmap_put(HashMap* map, const char* key, void* value);
/* Public: Remove a value with the given key from the map.
*
@@ -115,7 +115,7 @@ bool emhashmap_put(HashMap* map, char* key, void* value);
* responsible for freeing any memory associated with that pointer.
* Returns NULL if the key was not in the map.
*/
-void* emhashmap_remove(HashMap* map, char* key);
+void* emhashmap_remove(HashMap* map, const char* key);
/* Public: Get the number of keys in the map.
*