TDcal::Fetch(3) FreeBSD Library Functions Manual TDcal::Fetch(3)

TDcal::Fetch
TDcal Perl programming library

use TDcal::Fetch;


($ok, $changed, $ical) =
fetch($calref);

$bool =
fetchlock($calref);

$bool =
fetchunlock($calref);

TDcal::Fetch provides functions that perform loading of calendar data from files and from remote calendar servers.

In these functions, the agrument $calref is a calendar reference as returned by tdcalref().

fetch() examines the URL configured for the calendar and obtains the calendar data associated with the URL. If the URL starts with ‘file://’, the file is read in. If the URL starts with either ‘https://’ or ‘http://’, fetch performs an HTTPS or HTTP query to obtain the calendar from the server. In the event of errors, fetch() logs error messages directly to the TDcal log file, see tdlog(). It does not set $tderr in the event of an error return.

fetchlock() acquires the synchronization lock for the calendar. If the lock is already held by another process that still exists, fetchlock() will fail.

fetchunlock() releases the synchronization lock for the calendar.

fetch() returns a boolean value $ok to indicate success or failure, $changed a boolean value to indicate if the calendar changed since the last time it was fetched, and $ical an iCalendar containing the new calendar. It is intended that $ical is passed to icalparse() to incorporate the calendar into TDcal's current calendar data.

fetchlock() and fetchunlock() return a boolean value to indicate success or failure.

TDcal(3), TDcal::iCalendar(3), td(5), TDcal(7).

See TDcal(7).

See TDcal(7).
August 18, 2013 FreeBSD 13.0-RELEASE