public static LockdownError lockdownd_get_sync_data_classes(LockdownClientHandle client, out System.Collections.ObjectModel.ReadOnlyCollection <string> classes, ref int count) { System.Runtime.InteropServices.ICustomMarshaler classesMarshaler = LockdownMarshaler.GetInstance(null); System.IntPtr classesNative = System.IntPtr.Zero; LockdownError returnValue = LockdownNativeMethods.lockdownd_get_sync_data_classes(client, out classesNative, ref count); classes = ((System.Collections.ObjectModel.ReadOnlyCollection <string>)classesMarshaler.MarshalNativeToManaged(classesNative)); classesMarshaler.CleanUpNativeData(classesNative); return(returnValue); }
/// <summary> /// Calculates and returns the data classes the device supports from lockdownd. /// </summary> /// <param name="client"> /// An initialized lockdownd client. /// </param> /// <param name="classes"> /// A pointer to store an array of class names. The caller is responsible /// for freeing the memory which can be done using mobilesync_data_classes_free(). /// </param> /// <param name="count"> /// The number of items in the classes array. /// </param> /// <returns> /// LOCKDOWN_E_SUCCESS on success, /// LOCKDOWN_E_INVALID_ARG when client is NULL, /// LOCKDOWN_E_NO_RUNNING_SESSION if no session is open, /// LOCKDOWN_E_PLIST_ERROR if the received plist is broken /// </returns> public virtual LockdownError lockdownd_get_sync_data_classes(LockdownClientHandle client, out System.Collections.ObjectModel.ReadOnlyCollection <string> classes, ref int count) { return(LockdownNativeMethods.lockdownd_get_sync_data_classes(client, out classes, ref count)); }