/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public int getPropertySize(Struct<?> specifier) throws OSStatusException { IntPtr ptr = new IntPtr(); OSStatus status = getPropertyInfo0( this, specifier == null ? 0 : Struct.sizeOf(specifier), specifier == null ? null : specifier.as(VoidPtr.class), ptr); OSStatusException.throwIfNecessary(status); return ptr.get(); }
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public <T extends Struct<T>> T getProperty(Struct<?> specifier, Class<T> type) throws OSStatusException { T data = Struct.allocate(type); IntPtr dataSize = new IntPtr(Struct.sizeOf(data)); OSStatus status = getProperty0( this, specifier == null ? 0 : Struct.sizeOf(specifier), specifier == null ? null : specifier.as(VoidPtr.class), dataSize, data.as(VoidPtr.class)); OSStatusException.throwIfNecessary(status); return data; }
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public static void delete(SecQuery query) throws OSStatusException { OSStatus status = delete0(query); OSStatusException.throwIfNecessary(status); }
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public static void update(SecQuery query, SecAttributes attributesToUpdate) throws OSStatusException { OSStatus status = update0(query, attributesToUpdate); OSStatusException.throwIfNecessary(status); }
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public static CFType add(SecAttributes attributes) throws OSStatusException { CFType.CFTypePtr ptr = new CFType.CFTypePtr(); OSStatus status = add0(attributes, ptr); OSStatusException.throwIfNecessary(status); return ptr.get(); }
/** * @throws OSStatusException * @since Available in iOS 2.0 and later. */ public static CFType getMatching(SecQuery query) throws OSStatusException { CFType.CFTypePtr ptr = new CFType.CFTypePtr(); OSStatus status = getMatching0(query, ptr); OSStatusException.throwIfNecessary(status); return ptr.get(); }