laola.pl

Quick Reference

Short reference on the functions of perl package "laola.pl", as of Jun/30/97.
laola_close_document
"ok" = laola_close_document ()
Close the Laola style document.

laola_get_directory
%pps_names = laola_get_directory ($pps)
Read the directory denoted by property handle $pps. Returns a hash array with the property names as keys and property handles as values. [$pps_names{$pps_name} == $pps]
Note: To get the root directory, call laola_get_directory(0)

laola_get_dirhandles
@pps = laola_get_dirhandles ($pps)
Similar to laola_get_directory. Returns not the names, but only the property handles of the directory denoted by property handle $pps.
Note: to get the root directory, call laola_get_dirhandles(0)
Note: Normally you will use laola_get_directory instead.

laola_get_file
"ok" || $error = laola_get_file ($pps, extern $buf [,$offset, $size])
Read the file property $pps into buffer $buf. If there is an optional $offset and $size, only this part of the file will be read.

laola_get_filesize
$filesize || 0 = laola_get_filesize ($pps)
Returns the byte size of the file property $pps.

laola_get_trash
"ok" || $error = laola_get_trash ($type, extern $buf [,$offset, $size])
Read the trash section $type into buffer $buf. If there is an optional $offset and $size, only this part of the trash section will be read. Trash types can be 0, 1, 2, 4, 8 or any sum of this, like (1+2+8). 0 is default and yields (1+2+4+8).
Note: A explanation of this types is still to be done.

laola_get_trashsize
$sizeof_trash_section = laola_get_trashsize ($type)
Returns the byte size of the trash section $type.

laola_is_directory
1 || 0 = laola_is_directory ($pps)
Returns 1 if the property handle $pps is refering to a directory, 0 otherwise.

laola_is_file
1 || 0 = laola_is_file ($pps)
Returns 1 if the property handle $pps is refering to a file, 0 otherwise.

laola_is_file_ppset
$ppset_type || 0 = laola_is_file_ppset ($pps)
Returns the type of the property set, if the file property handle $pps is refering to a property set, 0 otherwise.
Note: $ppset_type can be either 1 or 5 at the moment.

laola_is_root
1 || 0 = laola_is_root ($pps)
Returns 1 if the property handle $pps is refering to the root, 0 otherwise.
Note: At the moment only property handle 0 should be the root.
Note: Normally you will not have to use this function.

laola_modify_file
"ok" || $error = laola_modify_file ($pps, extern $buf, $offset, $size)
Modifies the contents of the property file $pps. $size bytes of the file $pps starting at offset $offset will be replaced by $size bytes of the buf $buf starting at offset 0.
Note: This is still very restrictive, e.g. because the size of a file cannot be changed. Also missing is a possibility to give an offset to $buf.

laola_modify_trash
"ok" || $error = laola_modify_trash ($type, extern $buf, $offset, $size)
Modifies the contents of the trash section $type. $size bytes of the trash section $type starting at offset $offset will be replaced by $size bytes of the buf $buf starting at offset 0.

laola_open_document
"ok" || $error = laola_open_document ($filename [,$openmode [,buf] ])
Open the Laola style document with document path (name) $filename. $openmode can be read, read/write or buffer. If you specify $buf, laola will read the document data from buffer instead from a real file. This buffer will not be modified. In other words, it is always read only.
Open modes
Bit 0 Unset1 Set
0 Read Only (default)Read and Write
4 File Mode (default)Buffer Mode

Note: It is only possible to have one file opened!

laola_pps_get_date
($day, $month, $year, $hour, $min, $sec) || 0 = laola_pps_get_date ($pps)
Returns the last modification date and time of the directory property handle $pps. The range of the result is:
(1..31, 1..12, 1601..., 0..23, 0..59, 0.x .. 59.x)

laola_pps_get_name
$name_of_pps = laola_pps_get_name ($pps)
Returns the name of the property handle $pps.

laola_ppset_get_dictionary
("ok", %dictionary) || $error = laola_ppset_get_dictionary ($pps)
Returns a hash array with all possible ids of a property set denoted by property set handle $pps as keys and their property set id names as values. This is known to be the dictionary of a property set.
Note: Normally you will use ppset_get_idset instead.
Note: laola.pl offers default dictionaries for "\05SummaryInformation", "\05DocumentSummaryInformation" and for fake ppset "\01CompObj".

laola_ppset_get_idset
("ok", %ppset_idset) || $error = laola_ppset_get_idset ($pps)
Returns a hash array with the available ids of a property set as keys and their property set id names according to the property sets dictionary as values. [$ppset_idset{$token} == $property_name{$token}]
E.g., if for property set "\05SummaryInformation" id 3 were available, then $ppset_idset{3}=="subject" is true.
Note: Some or all names can be empty, if they cannot be figured out. Nevertheless the ids are valid.

laola_ppset_get_property
($type, @mixed) || ("error", $error) = laola_ppset_get_property ($pps, $id)
Returns the property @mixed belonging to property identifier $id from property set denoted by $pps. @mixed is a one or more element array, depending on $type. Mixed can be also a property vector (an array of properties). @mixed is a vector, if ($type & 0x1000). In that case:
@mixed == ( ($n1, $type1, @mixed1), ($n2, $type2, @mixed2), ...). To yield the vector elements you will have to do something like:
while (@mixed) {
   ($type_n, @mixed_n) = splice(@mixed, 0, shift(@mixed));
   <do something with $type_n and @mixed_n>
}


Tables

Table 1: Property types

$type  typestatus byte size (file)
0x00 empty ok 0
0x01 null ok 0
0x02 i2 (word) ok 2
0x03 i4 (long) ok 4
0x04 r4 (real) ok 4
0x05 r8 (double) ok 8
0x06 cy not available
0x07 date not available
0x08 bstr not available
0x0a error ok 4
0x0b bool ok 4
0x0c variant ok 4+sizeof($type)
0x11 ui1 (uchar) ok 1
0x12 ui2 (uword) ok 2
0x13 ui4 (ulong) ok 4
0x14 i8 not available
0x15 ui8 not available
0x1e lpstr (string) ok 5+length($str)
0x1f lpwstr not available
0x40 filetime ok 8
0x41 blob not available
0x42 stream not available
0x43 storage not available
0x44 streamed_object not available
0x45 stored_object not available
0x46 blobobject not available
0x48 clsid not available
0x49 cf not available
0x1000vector ok
 

Table 2: Trash types

$type  type
1 Big blocks
2 Small blocks
4 File end space
8 System space

Back to Laola Homepage.