@MarshalsPointer public static long toNative(List<CFURLUbiquitousItemDownloadingStatus> l, long flags) { if (l == null) { return 0L; } CFArray array = CFMutableArray.create(); for (CFURLUbiquitousItemDownloadingStatus o : l) { array.add(o.value()); } return CFType.Marshaler.toNative(array, flags); }
@MarshalsPointer public static List<CFURLUbiquitousItemDownloadingStatus> toObject( Class<? extends CFType> cls, long handle, long flags) { CFArray o = (CFArray) CFType.Marshaler.toObject(CFArray.class, handle, flags); if (o == null) { return null; } List<CFURLUbiquitousItemDownloadingStatus> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(CFURLUbiquitousItemDownloadingStatus.valueOf(o.get(i, CFString.class))); } return list; }