Palm::TreoPhoneCallDB - Handler for Treo PhoneCallDB databases
use Palm::TreoPhoneCallDB timezone => 'Europe/London';
my $pdb = Palm::PDB->new();
This is a helper class for the Palm::PDB package, which parses the database generated by Palm Treos as a record who you called, when, and for how long.
You can set some global options when you 'use' the module:
Defaults to 'Europe/London'.
Whether to include the raw binary blob of data in the parsed records. Only really useful for debuggering, and so defaults to false.
This class inherits from Palm::Raw, so has all of its methods. The following are over-ridden, and differ from that in the parent class thus:
Returns data structures with the following keys:
The raw data blob passed to the method. This is only present if the incl_raw option is true.
The date the call started, in YYYY-MM-DD format
The time the call started, in HH:MM format
The epoch time the call started. Note that because the database doesn't store the timezone, we assume 'Europe/London'. If you want to change that, then suppy a timezone option when you 'use' the module.
Internally, this uses the DateTime module. In the case of ambiguous times then it uses the latest UTC time. For invalid local times, the epoch is set to -1, an impossible number as it's before Palm even existed.
Note that this is always the Unix epoch time. See DateTime for details of what this means.
The length of the call in seconds
The name of the other party, which the Treo extracts from the SIM phone-book or from the Palm address book at the time the call is connected.
The number of the other party. This is not normalised so you might see the same number in different formats, eg 02079813000 and +442079813000. I may add number normalisation in the future.
Either 'Incoming', 'Outgoing' or 'Missed'.
Other fields may be added in the future.
There is currently no support for creating a new database, or for editing the contents of an existing database. If you need that functionality, please submit a patch with tests. I will *not* write this myself unless I need it.
Behaviour if you try to create or edit a database is currently undefined.
Online documentation claims that there are various flags in the records to indicate whether calls are incoming or outgoing and so on. I can't find these flags anywhere in the data generated by my Treo 680. Instead, it seems to be stored in the 'category' field. It is, however, possible that the category numbers for each type of call vary from one Treo to another maybe depending on the order in which the first calls are made.
If you find any other bugs please report them either using http://rt.cpan.org/ or by email. Ideally, I would like to receive a sample database and a test file, which fails with the latest version of the module but will pass when I fix the bug.
David Cantrell <email@example.com>
Copyright 2007 David Cantrell
This module is free-as-in-speech software, and may be used, distributed, and modified under the same terms as Perl itself.
This module is also free-as-in-mason software.
To install Palm::TreoPhoneCallDB, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.