include/alp/calendar_dml.h File Reference


Detailed Description

Public header for the Calendar Data Model.

>

#include <sqlite3.h>
#include <stdint.h>
#include <string.h>
#include <time.h>
#include <alp/catmgr_dml.h>
#include <alp/types.h>
#include <alp/sysclass.h>
#include <alp/hs_status.h>
#include <alp/hs_common.h>
#include <alp/hs_change_mgr.h>
#include <glib.h>

Go to the source code of this file.

Defines

#define ALP_CALENDAR_OPEN_TO_DATE   "--alp-calendar-date-launch"
 Opens calendar to a specified date. Takes a time_t as an argument.
#define ALP_CALENDAR_OPEN_TO_EVENT   "--alp-calendar-event-launch"
 Opens calendar to a specified event. Takes an AlpLuid as an argument.
#define ALP_CALENDAR_OPEN_TO_VIEW   "--alp-calendar-view-launch"
 Opens calendar to a specific view as the first view. Takes a view name as an argument.
#define ALP_DATAMODEL_NOTIFICATION_TYPE_CALENDARS   "alp/datamodel/calendars"
#define ALP_STATUS_CALENDAR_DML_BAD_PARAM   (ALP_CLASS_CALENDAR_DML | 0x00030000)
#define ALP_STATUS_CALENDAR_DML_CHANGEMGR_ERROR   (ALP_CLASS_CALENDAR_DML | 0x00070000)
#define ALP_STATUS_CALENDAR_DML_DATABASE_ERR   (ALP_CLASS_CALENDAR_DML | 0x00040000)
#define ALP_STATUS_CALENDAR_DML_DB_BUSY   (ALP_CLASS_CALENDAR_DML | 0x00090000)
#define ALP_STATUS_CALENDAR_DML_INTERNAL_ERR   (ALP_CLASS_CALENDAR_DML | 0x00060000)
#define ALP_STATUS_CALENDAR_DML_INVALID_LUID   (ALP_CLASS_CALENDAR_DML | 0x00050000)
#define ALP_STATUS_CALENDAR_DML_NO_MEM   (ALP_CLASS_CALENDAR_DML | 0x00010000)
#define ALP_STATUS_CALENDAR_DML_NO_RECORDS   (ALP_CLASS_CALENDAR_DML | 0x00020000)
#define ALP_STATUS_CALENDAR_DML_NOT_VCALENDAR   (ALP_CLASS_CALENDAR_DML | 0x00080000)

Typedefs

typedef time_t DateTimeType
typedef time_t DateType
typedef time_t TimeType

Enumerations

enum  AlpCalendarDmlColumnType {
  kCalRowID = 0, kCalRepeatingEvent, kCalUntimedEvent, kCalStartDateTime,
  kCalEndDateTime, kCalTimeZone, kCalTimeZoneCity, kCalTimeAdvance,
  kCalTimeAdvanceUnit, kCalRepeatType, kCalRepeatEndDate, kCalRepeatFrequency,
  kCalRepeatOn, kCalRepeatStartOfWeek, kCalExceptionDates, kCalDescription,
  kCalLocation, kCalNote, kCalEventType, kCalContactID,
  kCalAttendeeList, kCalSubject, kCalIsPrivate, kCalSmartJoinInfo
}

Functions

alp_status_t alp_calendar_dml_add_memberships (AlpDmlH dmlH, AlpLuid eventLuid, const AlpLuid *categoryLuids, AlpLuid membershipLuid, uint32_t numCategoryLuids)
 Adds the given eventLuid to the given categories.
alp_status_t alp_calendar_dml_close (AlpDmlH dmlH)
 Close a handle to the Calendar Data Model.
alp_status_t alp_calendar_dml_delete (AlpDmlH dmlH, AlpLuid eventLuid)
 Given a LUID, the entry is removed from the calendar database.
alp_status_t alp_calendar_dml_events_from_vCal_buffer (AlpDmlH dmlH, char *dataBuf, bool fromExgMgr, GList **eventIDs) __attribute((deprecated))
 Deprecated. Use alp_calendar_dml_read_from_vCal_buffer.
alp_status_t alp_calendar_dml_events_from_vCal_file (AlpDmlH dmlH, int theDataFd, bool fromExgMgr, GList **eventIDs) __attribute((deprecated))
 Deprecated. Use alp_calendar_dml_read_from_vCal_file instead.
alp_status_t alp_calendar_dml_events_to_vCal_buffer (AlpDmlH dmlH, uint8_t **dataBuf, uint32_t *size, bool toExgMgr, GList *eventIDs) __attribute((deprecated))
 Deprecated. Use alp_calendar_dml_write_to_vCal_buffer instead.
alp_status_t alp_calendar_dml_events_to_vCal_file (AlpDmlH dmlH, int theDataFd, bool toExgMgr, GList *eventIDs) __attribute((deprecated))
 Deprecated. Use alp_calendar_dml_write_to_vCal_file instead.
AlpDmlH alp_calendar_dml_get_catmgr_handle (AlpDmlH dmlH)
 Retrieves a handle to the catmgr from the actual given dml handle. The returned handle should be used to make calls to the catui.
alp_status_t alp_calendar_dml_get_item (AlpDmlH dmlH, AlpLuid itemLuid, AlpDmlStatementH *stmtH)
 This API call can be used to fetch details of a given event specified by its LUID A call to alp_calendar_dml_statement_next needs to be made before fetching any values for the desired row. using the statement handle returned.
alp_status_t alp_calendar_dml_insert (AlpDmlH dmlH, AlpDmlItemH eventH, AlpLuid *eventLuid)
 Inserts a new event into the calendar database.
alp_status_t alp_calendar_dml_item_create (AlpDmlItemH *eventH)
 This API call can be used to create a calendar event in memory that can be used by alp_calendar_dml_insert().
alp_status_t alp_calendar_dml_item_destroy (AlpDmlItemH eventH)
 This API call can be used to free the memory allocated for a calendar event from a call to alp_calendar_dml_item_create.
alp_status_t alp_calendar_dml_item_set_blob (AlpDmlItemH eventH, AlpCalendarDmlColumnType column, const void *value, int32_t size)
 This API call is used to set the blob value for a given field.
alp_status_t alp_calendar_dml_item_set_int32 (AlpDmlItemH eventH, AlpCalendarDmlColumnType column, const uint32_t *value)
 This API call is used to set the integer value for a given field.
alp_status_t alp_calendar_dml_item_set_string (AlpDmlItemH eventH, AlpCalendarDmlColumnType column, const char *value)
 This API call is used to set the text value for a given field.
alp_status_t alp_calendar_dml_memberships_add (AlpDmlH dmlH, AlpLuid eventLuid, const AlpLuid *categoryIDs, AlpLuid membershipLuid, uint32_t numCategoryIDs) __attribute((deprecated))
 Deprecated. Call alp_calendar_dml_add_memberships instead.
alp_status_t alp_calendar_dml_memberships_remove (AlpDmlH dmlH, AlpLuid eventLuid, const AlpLuid *categoryIDs, AlpLuid membershipLuid, uint32_t numCategoryIDs) __attribute((deprecated))
 Deprecated. Call alp_calendar_dml_remove_memberships instead.
alp_status_t alp_calendar_dml_open (AlpDmlH *dmlH, bool changeTrackingOn)
 Opens and returns a handle to the Calendar Data Model. Caller should call alp_calendars_dml_close() when finished with it. Holding a handle open does not tie up the data model or hold down any important resources, however it is important to note that it is not possible for one datamodel user to perform a write while another reads; or one to read while another writes, so it's desirable for datamodel users to make these operations interruptible or as short as possible.
alp_status_t alp_calendar_dml_read_from_vCal_buffer (AlpDmlH dmlH, const uint8_t *dataBuf, uint32_t size, bool fromExgMgr, bool forModify, GList **eventLuids)
 Creates one or more calendar events from the contents of a buffer containing vCals.
alp_status_t alp_calendar_dml_read_from_vCal_file (AlpDmlH dmlH, int theDataFd, bool fromExgMgr, bool forModify, GList **eventLuids)
 Creates one or more calendar events from the contents of a file containing vCals.
alp_status_t alp_calendar_dml_remove_memberships (AlpDmlH dmlH, AlpLuid eventLuid, const AlpLuid *categoryLuids, AlpLuid membershipLuid, uint32_t numCategoryLuids)
 Removes a given eventLuid's membership from a set of categories. If categoryLuids is NULL, then the eventLuid's membership is removed from ALL categories (this is useful when deleting a event from the datamodel).
alp_status_t alp_calendar_dml_search_begin (AlpDmlH dmlH, AlpDmlStatementH *stmtH, const char *search_string, int32_t *numResults)
 This API call can be used to search events in calendar database.
alp_status_t alp_calendar_dml_search_statement_begin (AlpDmlH dml, AlpDmlStatementH *stmtH, const char *search_string, int32_t *numResults) __attribute((deprecated))
 Deprecated. Call alp_calendar_dml_search_begin instead.
alp_status_t alp_calendar_dml_statement_begin (AlpDmlH dmlH, AlpLuid eventLuid, AlpDmlStatementH *stmtH, uint32_t categoryLUID, bool unfiled, DateTimeType startTime, DateTimeType endTime, const char *orderBy, int32_t *numResults)
 This API call can be used to fetch events in calendar database filtered based on three criteria 1. Filter based on category 2. Filter based on event starttime and event endtime 3. Filter based on event luid.
alp_status_t alp_calendar_dml_statement_end (AlpDmlH dmlH, AlpDmlStatementH stmt) __attribute((deprecated))
 Temporarily deprecated. Use alp_calendar_dml_statement_end_new.
alp_status_t alp_calendar_dml_statement_end_new (AlpDmlStatementH stmt)
 This API call is used to end a query that was begun in call to alp_calendar_dml_statement_begin.
alp_status_t alp_calendar_dml_statement_get_blob (AlpDmlStatementH stmtH, AlpCalendarDmlColumnType column, bool copy, void **value, int32_t *size)
 This API call is used to fetch the blob value for a given field.
alp_status_t alp_calendar_dml_statement_get_int32 (AlpDmlStatementH stmtH, AlpCalendarDmlColumnType column, uint32_t *value)
 This API call is used to fetch the integer value for a given field.
alp_status_t alp_calendar_dml_statement_get_string (AlpDmlStatementH stmtH, AlpCalendarDmlColumnType column, bool copy, char **value)
 This API call is used to fetch the text value for a given field.
alp_status_t alp_calendar_dml_statement_next (AlpDmlH dmlH, AlpDmlStatementH *stmtH) __attribute((deprecated))
 Temporarily deprecated, use alp_calendar_dml_statement_next_new.
alp_status_t alp_calendar_dml_statement_next_new (AlpDmlStatementH *stmtH)
 This API call is used to fetch the next event from the query results( started by a alp_calendar_dml_statement_begin call).
alp_status_t alp_calendar_dml_transaction_begin (AlpDmlH dmlH, bool exclusive)
 This API call is used to begin a transaction.
alp_status_t alp_calendar_dml_transaction_end (AlpDmlH dmlH)
 This API call is used to end a transaction begun by a call to alp_calendar_dml_transaction_begin.
alp_status_t alp_calendar_dml_transaction_rollback (AlpDmlH dmlH)
 This API call is used to rollback a transaction begun by a call to alp_calendar_dml_transaction_begin.
alp_status_t alp_calendar_dml_update (AlpDmlH dmlH, AlpDmlItemH eventH)
 Updates a give calendar event with the specified new information.
alp_status_t alp_calendar_dml_write_to_vCal_buffer (AlpDmlH dmlH, uint8_t **dataBuf, uint32_t *size, bool toExgMgr, const GList *eventLuids)
 Writes one or more calendar vCals to an allocated buffer.
alp_status_t alp_calendar_dml_write_to_vCal_file (AlpDmlH dmlH, int theDataFd, bool toExgMgr, const GList *eventLuids)
 Writes one or more vCals to the given file.


Define Documentation

#define ALP_DATAMODEL_NOTIFICATION_TYPE_CALENDARS   "alp/datamodel/calendars"
 

Data-change notification-type for "calendar". Any data-change in content, category, membership of a calendar will fire this notification-event.


Generated on Wed Jul 30 07:06:39 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.