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.
-
– newBerValue
Allocate 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
-
berData
The NSData object which contains the object’s value.
property -
bv_len
The number of bytes required to store the object’s value.
property -
bv_val
Returns a pointer to the receiver’s contents.
property
Derived Data
-
berImage
Attempts to interpret the object’s value as an image.
property -
berString
Attempts to interpret the object’s value as an UTF8 string.
property -
berStringBase64
Returns the object’s value as a base64 encoded string.
property
Type of data
-
isBerData
Indicates the data is valid an NSData object.
property -
isBerImage
Indicates the data is a valid image.
property -
isBerString
Indicates that the data is a valid string.
property -
isBerStringBase64
Indicates the data can be base64 encoded.
property
Properties
berData
The NSData object which contains the object’s value.
@property (atomic, copy, readonly) NSData *berData
Declared In
LKBerValue.h
berImage
Attempts to interpret the object’s value as an image.
@property (atomic, copy, readonly) UIImage *berImage
Return 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.h
berString
Attempts to interpret the object’s value as an UTF8 string.
@property (atomic, copy, readonly) NSString *berString
Return Value
If the Ber value is a valid UTF8 string, this property returns an NSString. Otherwise nil is returned.
Declared In
LKBerValue.h
berStringBase64
Returns the object’s value as a base64 encoded string.
@property (atomic, copy, readonly) NSString *berStringBase64
Declared In
LKBerValue.h
bv_len
The number of bytes required to store the object’s value.
@property (atomic, readonly) ber_len_t bv_len
Declared In
LKBerValue.h
bv_val
Returns a pointer to the receiver’s contents.
@property (atomic, readonly) const char *bv_val
Return 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.h
isBerData
Indicates the data is valid an NSData object.
@property (atomic, readonly) BOOL isBerData
Return Value
This property always returns YES
.
Declared In
LKBerValue.h
isBerImage
Indicates the data is a valid image.
@property (atomic, readonly) BOOL isBerImage
Declared In
LKBerValue.h
Class Methods
newBerValueWithData:
Allocate a new struct berval from an NSData object
+ (BerValue *)newBerValueWithData:(NSData *)data
Parameters
- 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.h
valueWithBerValue:
Creates a new object with data from a BerValue struct.
+ (id)valueWithBerValue:(BerValue *)value
Parameters
- value
A BerValue referenced used to populate the object.
Declared In
LKBerValue.h
Instance Methods
initWithBerValue:
Initialize a new object with data from a BerValue struct.
- (id)initWithBerValue:(BerValue *)value
Parameters
- value
A BerValue referenced used to populate the object.
Declared In
LKBerValue.h
initWithData:
Initialize a new object with data from an NSData object.
- (id)initWithData:(NSData *)value
Parameters
- value
An NSData object used to populate the object.
Declared In
LKBerValue.h