LKBerValue Class Reference
| Inherits from | NSObject |
| Conforms to | NSCopying |
| Declared in | LKBerValue.h LKBerValue.m |
Overview
LKBerValue stores the inidividual attribute values returned as results from LDAP queries. The information stored by an instance LKBerValue can be accessed as a string, an image, or binary data.
Tasks
Object Management Methods
-
– initWithBerValue:Initialize a new object with data from a BerValue struct.
-
– initWithData:Initialize a new object with data from an NSData object.
-
– initWithString:Initialize a new object with data from an NSString object.
-
– newBerValueAllocate a new struct berval.
-
+ newBerValueWithData:Allocate a new struct berval from an NSData object
-
+ valueWithBerValue:Creates a new object with data from a BerValue struct.
-
+ valueWithData:Creates a new object with data from an NSData object.
-
+ valueWithString:Creates a new object with data from an NSString object.
BerValue Data
-
berDataThe NSData object which contains the object’s value.
property -
bv_lenThe number of bytes required to store the object’s value.
property -
bv_valReturns a pointer to the receiver’s contents.
property
Derived Data
-
berImageAttempts to interpret the object’s value as an image.
property -
berStringAttempts to interpret the object’s value as an UTF8 string.
property -
berStringBase64Returns the object’s value as a base64 encoded string.
property
Type of data
-
isBerDataIndicates the data is valid an NSData object.
property -
isBerImageIndicates the data is a valid image.
property -
isBerStringIndicates that the data is a valid string.
property -
isBerStringBase64Indicates the data can be base64 encoded.
property
Properties
berData
The NSData object which contains the object’s value.
@property (atomic, copy, readonly) NSData *berDataDeclared In
LKBerValue.hberImage
Attempts to interpret the object’s value as an image.
@property (atomic, copy, readonly) UIImage *berImageReturn Value
This property returns an UIImage on iOS and NSImage on OS X. If the data is not a valid image, nil is returned.
Declared In
LKBerValue.hberString
Attempts to interpret the object’s value as an UTF8 string.
@property (atomic, copy, readonly) NSString *berStringReturn Value
If the Ber value is a valid UTF8 string, this property returns an NSString. Otherwise nil is returned.
Declared In
LKBerValue.hberStringBase64
Returns the object’s value as a base64 encoded string.
@property (atomic, copy, readonly) NSString *berStringBase64Declared In
LKBerValue.hbv_len
The number of bytes required to store the object’s value.
@property (atomic, readonly) ber_len_t bv_lenDeclared In
LKBerValue.hbv_val
Returns a pointer to the receiver’s contents.
@property (atomic, readonly) const char *bv_valReturn Value
A read-only pointer to the receiver’s contents.
Discussion
If the length of the receiver is 0, this method returns NULL.
Declared In
LKBerValue.hisBerData
Indicates the data is valid an NSData object.
@property (atomic, readonly) BOOL isBerDataReturn Value
This property always returns YES.
Declared In
LKBerValue.hisBerImage
Indicates the data is a valid image.
@property (atomic, readonly) BOOL isBerImageDeclared In
LKBerValue.hClass Methods
newBerValueWithData:
Allocate a new struct berval from an NSData object
+ (BerValue *)newBerValueWithData:(NSData *)dataParameters
- data
The NSData object used to populate an allocated BerValue
Return Value
This method returns a pointer to a struct berval. The
struct berval must be freed using ber_bvfree().
Declared In
LKBerValue.hvalueWithBerValue:
Creates a new object with data from a BerValue struct.
+ (id)valueWithBerValue:(BerValue *)valueParameters
- value
A BerValue referenced used to populate the object.
Declared In
LKBerValue.hInstance Methods
initWithBerValue:
Initialize a new object with data from a BerValue struct.
- (id)initWithBerValue:(BerValue *)valueParameters
- value
A BerValue referenced used to populate the object.
Declared In
LKBerValue.hinitWithData:
Initialize a new object with data from an NSData object.
- (id)initWithData:(NSData *)valueParameters
- value
An NSData object used to populate the object.
Declared In
LKBerValue.h