GSM-Gnokii

 view release on metacpan or  search on metacpan

lib/GSM/Gnokii.pm  view on Meta::CPAN

    1: VIPs
    2: Friends
    3: Work
    4: Others
    5: None

Some fields are either ignored by this module, because they cause the
write to fail (e.g. C<tel_common>, C<tel_general>, and C<tel_none>),
or because the gnokii library does not write them (mainly the C<address>
and C<person> data seems to get lost).

On success, C<WritePhonbookEntry> returns the location this entry was
written to. On failure it returns C<undef>.

=head2 GetSpeedDial (number)

Returns a reference to a hash with the information needed to get to
the number used:

  number           =>  2,
  location         => 23,
  memory           => "ME",

To get the address book entry to the speed dial, use

  my $ab = $gsm->GetPhonebook ("ME", 23, 23);

=head2 SetSpeedDial (self, memtype, location, number)

Set the speed dial specified by the arguments. C<memtype> should be
either C<ME> or C<SM>, C<number> is the key number, usually allowed
are keys C<2> through C<9>, C<location> is the location in the phonebook
of memory type C<memorytype>. See L<GetPhonebook>.

=head2 GetDateTime

Returns a reference to a hash with two elements, like:

  date             => "2011-01-23 17:22:37",
  timestamp        => 1295799757,

=head2 SetDateTime (timestamp)

Set date and time on device. The C<timestamp> is a unix timestamp as
returned by the C<time> function.

=head2 GetAlarm

Returns a reference to a hash with alarm info, like:

  alarm            => "07:25",
  state            => "off",

=head2 SetAlarm (hour, minute)

Set and enable alarm. Hour should be between 0 and 23, Minute between
0 and 59.

=head2 GetCalendarNotes (start, end)

Returns a reference to a list of calendar note hashes, like:

  location         => 1,
  date             => "2011-11-11 11:11:11",
  type             => "Meeting",
  text             => "Be there or be fired",
  mlocation        => "Board room",
  alarm            => "2010-10-10 10:10:10",
  recurrence       => "Weekly",
  number           => "+31612345678",

=head2 WriteCalendarNote ({ ... })

Set a calendar note,  attributes marked with a * are required

  date             => time + 86400,   # * Date and time of note
  text             => "Call John!",   # * Note text
  type             => "call",         #   Note type, defaults to MEMO
  number           => "+31612345678", #   Required for type CALL
  mlocation        => "Board room",   #   Adviced for type MEET
  alarm            => time + 86400,   #   Alarm time
  recurrence       => "Weekly",       #   Recurrence, defaults to NEVER

Valid note types are C<REMINDER>, C<CALL>, C<MEETING>, C<BIRTHDAY>,
and C<MEMO>. Type match is done case-ignorant and types may be
abbreviated to 4 characters.

Valid recurrence specifications are C<NEVER>, C<DAILY>, C<WEEKLY>,
C<2WEEKLY>, C<YEARLY>.  Type match is done case-ignorant and types
may be abbreviated to 4 characters.

=head2 GetTodo (start, end)

Returns a reference to a list of TODO note hashes, like:

  location         => 1,
  text             => "Finish GSM::Gnokii",
  priority         => "low",

=head2 WriteTodo ({ ... })

Write a TODO note. The contents of the hashref should match what GetTodo
returns for a fetched TODO entry.

=head2 DeleteAllTodos

Will delete B<all> TODO items.

=head2 GetDisplayStatus

Returns a reference to a hash with the display status, all boolean, like:

  call_in_progress => 0,
  unknown          => 0,
  unread_SMS       => 0,
  voice_call       => 0,
  fax_call_active  => 0,
  data_call_active => 0,
  keyboard_lock    => 0,
  sms_storage_full => 0,

=head2 Ping

Returns availability of the phone or undef if Ping is unimplemented in
libgnokii.

=head2 GetIMEI

Returns a reference to a hash with the IMEI data, like:

  model            => "RM-274",
  revision         => "V 07.21",
  imei             => "345634563456678",
  manufacturer     => "...",



( run in 1.869 second using v1.01-cache-2.11-cpan-800906f7e73 )