Index: runtime/include/dart_api.h |
=================================================================== |
--- runtime/include/dart_api.h (revision 27984) |
+++ runtime/include/dart_api.h (working copy) |
@@ -1466,7 +1466,7 @@ |
/** |
* Gets the data corresponding to the string object. This function returns |
* the data only for Latin-1 (ISO-8859-1) string objects. For all other |
- * string objects it return and error. |
+ * string objects it returns an error. |
* |
* \param str A string. |
* \param latin1_array An array allocated by the caller, used to return |
@@ -2071,7 +2071,29 @@ |
/* TODO(turnidge): Consider renaming to NativeFunctionResolver or |
* NativeResolver. */ |
+/* |
+ * ============== |
+ * Configurations |
+ * ============== |
+ */ |
+ |
+typedef enum { |
+ kStringConfig = 0, |
+ kIntegerConfig, |
+ kBoolConfig |
+} Dart_ConfigType; |
+ |
+/* TODO(iposva): Document. */ |
+typedef Dart_Handle (*Dart_ConfigCallback)(Dart_ConfigType type, |
+ Dart_Handle name); |
+ |
/** |
+ * Sets the configuration callback for the current isolate. This callback is |
+ * used to lookup configuration values by name in the current environment. |
+ */ |
+DART_EXPORT Dart_Handle Dart_SetConfigCallback(Dart_ConfigCallback callback); |
+ |
+/** |
* Sets the callback used to resolve native functions for a library. |
* |
* \param library A library. |