/// <summary> /// 获取SDK里app account对应的具体类型的app data目录(如图片消息文件存放目录,语音消息文件存放目录等) /// </summary> /// <param name="appAccount">APP account。如果传入空字符串,则返回结果为空</param> /// <param name="appdataType">具体类型的app data。见NIMAppDataType定义</param> /// <returns>返回的目录路径(目录可能未生成,需要app自行判断是否已生成)</returns> public static string GetUserSpecificAppDataDir(string appAccount, NIMAppDataType appdataType) { IntPtr outStrPtr = nim_tool_get_user_specific_appdata_dir(appAccount, appdataType); string ret = Marshal.PtrToStringAuto(outStrPtr); GlobalAPI.FreeStringBuffer(outStrPtr); return(ret); }
/// <summary> /// 获取SDK里app account对应的具体类型的app data目录(如图片消息文件存放目录,语音消息文件存放目录等) /// </summary> /// <param name="appAccount">APP account。如果传入空字符串,则返回结果为空</param> /// <param name="appdataType">具体类型的app data。见NIMAppDataType定义</param> /// <returns>返回的目录路径(目录可能未生成,需要app自行判断是否已生成)</returns> public static string GetUserSpecificAppDataDir(string appAccount, NIMAppDataType appdataType) { var outStrPtr = nim_tool_get_user_specific_appdata_dir(appAccount, appdataType); NimUtility.Utf8StringMarshaler marshaler = new NimUtility.Utf8StringMarshaler(); var ret = marshaler.MarshalNativeToManaged(outStrPtr) as string; GlobalAPI.FreeStringBuffer(outStrPtr); return(ret); }
private static extern IntPtr nim_tool_get_user_specific_appdata_dir(string app_account, NIMAppDataType appdata_type);