/// <summary> /// Initializes the Cloudeo SDK with custom options. /// </summary> /// <param name="listener"> /// Object that will process initialization state change notifications. /// This includes progress change and different states. /// </param> /// <param name="options"> /// Additionall initialization options container. /// </param> public static void init(PlatformInitListener listener, PlatformInitOptions options) { _listener = listener; //Perform platform initialization string sdkPath; if (options != null) { if (Path.IsPathRooted(options.sdkPath)) { sdkPath = options.sdkPath; } else { sdkPath = Path.Combine(AssemblyDirectory, options.sdkPath); } } else { sdkPath = Path.Combine(AssemblyDirectory, DEFAULT_SDK_PATH); } SetDllDirectory(sdkPath); ADLString logicLibPath = new ADLString(); logicLibPath.body = Path.Combine(sdkPath, "libs"); logicLibPath.length = (UInt32)sdkPath.Length; ADLInitOptions initOptions = new ADLInitOptions(); initOptions.logicLibPath = logicLibPath; doInit(initOptions); }
public static extern void adl_init_platform( adl_platform_init_done_clbck resultCallback, ref ADLInitOptions initializationOptions, IntPtr opaque);
/// <summary> /// /// </summary> /// <param name="options"></param> private static void doInit(ADLInitOptions options) { _onInitComplete = new adl_platform_init_done_clbck(onInitComplete); NativeAPI.adl_init_platform(_onInitComplete, ref options, IntPtr.Zero); }