Calendar

void GSM_CalendarFindDefaultTextTimeAlarmPhone(GSM_CalendarEntry * entry, int * Text, int * Time, int * Alarm, int * Phone, int * EndTime, int * Location)

Finds inxedes of default entries.

GSM_Error GSM_EncodeVTODO(char * Buffer, const size_t buff_len, size_t * Length, const GSM_ToDoEntry * note, const gboolean header, const GSM_VToDoVersion Version)

Encodes vTodo to buffer.

Parameters:
  • Buffer -

    Storage for data.

  • buff_len -

    Size of output buffer.

  • Length -

    Pointer to current position in data (will be incremented).

  • note -

    Note to encode.

  • header -

    Whether to include vCalendar header.

  • Version -

    Format of vTodo to create.

Return:

Error code.

GSM_Error GSM_EncodeVCALENDAR(char * Buffer, const size_t buff_len, size_t * Length, GSM_CalendarEntry * note, const gboolean header, const GSM_VCalendarVersion Version)

Encodes vCalendar to buffer.

Parameters:
  • Buffer -

    Storage for data.

  • buff_len -

    Size of output buffer.

  • Length -

    Pointer to current position in data (will be incremented).

  • note -

    Note to encode.

  • header -

    Whether to include vCalendar header.

  • Version -

    Format of vCalendar to create.

Return:

Error code.

GSM_Error GSM_DecodeVNOTE(char * Buffer, size_t * Pos, GSM_NoteEntry * Note)

Decodes vNote from buffer.

Parameters:
  • Buffer -

    Buffer to decode.

  • Pos -

    Current position in buffer (will be updated).

  • Note -

    Storage for note entry.

Return:

Error code.

GSM_Error GSM_EncodeVNTFile(char * Buffer, const size_t buff_len, size_t * Length, GSM_NoteEntry * Note)

Encodes vNote to buffer.

Parameters:
  • Buffer -

    Storage for data.

  • buff_len -

    Size of output buffer.

  • Length -

    Pointer to current position in data (will be incremented).

  • Note -

    Note to encode.

Return:

Error code.

GSM_Error GSM_DecodeVCALENDAR_VTODO(GSM_Debug_Info * di, char * Buffer, size_t * Pos, GSM_CalendarEntry * Calendar, GSM_ToDoEntry * ToDo, GSM_VCalendarVersion CalVer, GSM_VToDoVersion ToDoVer)

Decodes vCalendar and vTodo buffer.

Parameters:
  • di -

    Pointer to debugging description.

  • Buffer -

    Buffer to decode.

  • Pos -

    Current position in buffer (will be updated).

  • Calendar -

    Storage for calendar entry.

  • ToDo -

    Storage for todo entry.

  • CalVer -

    Format of vCalendar.

  • ToDoVer -

    Format of vTodo.

Return:

Error code

gboolean GSM_IsCalendarNoteFromThePast(GSM_CalendarEntry * note)

Detects whether calendar note is in past.

Parameters:
  • note -

    Note to check.

Return:

Whether entry is in past.

GSM_Error GSM_GetAlarm(GSM_StateMachine * s, GSM_Alarm * Alarm)

Reads alarm set in phone.

Parameters:
  • s -

    State machine pointer.

  • Alarm -

    Storage for alarm.

Return:

Error code

GSM_Error GSM_SetAlarm(GSM_StateMachine * s, GSM_Alarm * Alarm)

Sets alarm in phone.

Parameters:
  • s -

    State machine pointer.

  • Alarm -

    Alarm to set.

Return:

Error code

GSM_Error GSM_GetToDoStatus(GSM_StateMachine * s, GSM_ToDoStatus * status)

Gets status of ToDos (count of used entries).

Parameters:
  • s -

    State machine pointer.

  • status -

    Storage for todo status.

Return:

Error code

GSM_Error GSM_GetToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo)

Reads ToDo from phone.

Parameters:
  • s -

    State machine pointer.

  • ToDo -

    Storage for note.

Return:

Error code

GSM_Error GSM_GetNextToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo, gboolean start)

Reads ToDo from phone.

Parameters:
  • s -

    State machine pointer.

  • ToDo -

    Storage for note, if start is FALSE, should contain data from previous read (at least position).

  • start -

    Whether we’re doing initial read or continue in reading.

Return:

Error code

GSM_Error GSM_SetToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo)

Sets ToDo in phone.

Parameters:
  • s -

    State machine pointer.

  • ToDo -

    ToDo to set, should contain valid location.

Return:

Error code

GSM_Error GSM_AddToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo)

Adds ToDo in phone.

Parameters:
  • s -

    State machine pointer.

  • ToDo -

    ToDo to add.

Return:

Error code

GSM_Error GSM_DeleteToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo)

Deletes ToDo entry in phone.

Parameters:
  • s -

    State machine pointer.

  • ToDo -

    ToDo to delete, only location is actually used.

Return:

Error code

GSM_Error GSM_DeleteAllToDo(GSM_StateMachine * s)

Deletes all todo entries in phone.

Parameters:
  • s -

    State machine pointer.

Return:

Error code

GSM_Error GSM_GetCalendarStatus(GSM_StateMachine * s, GSM_CalendarStatus * Status)

Retrieves calendar status (number of used entries).

Parameters:
  • s -

    State machine pointer.

  • Status -

    Storage for status.

Return:

Error code

GSM_Error GSM_GetCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note)

Retrieves calendar entry.

Parameters:
  • s -

    State machine pointer.

  • Note -

    Storage for note.

Return:

Error code

GSM_Error GSM_GetNextCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note, gboolean start)

Retrieves calendar entry. This is useful for continuous reading of all calendar entries.

Parameters:
  • s -

    State machine pointer.

  • Note -

    Storage for note, if start is FALSE, should contain data from previous read (at least position).

  • start -

    Whether we’re doing initial read or continue in reading.

Return:

Error code

GSM_Error GSM_SetCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note)

Sets calendar entry

Parameters:
  • s -

    State machine pointer.

  • Note -

    New note values, needs to contain valid position.

Return:

Error code

GSM_Error GSM_AddCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note)

Adds calendar entry.

Parameters:
  • s -

    State machine pointer.

  • Note -

    Note to add.

Return:

Error code

GSM_Error GSM_DeleteCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note)

Deletes calendar entry.

Parameters:
  • s -

    State machine pointer.

  • Note -

    Note to delete, must contain position.

Return:

Error code

GSM_Error GSM_DeleteAllCalendar(GSM_StateMachine * s)

Deletes all calendar entries.

Parameters:
  • s -

    State machine pointer.

Return:

Error code

GSM_Error GSM_GetCalendarSettings(GSM_StateMachine * s, GSM_CalendarSettings * settings)

Reads calendar settings.

Parameters:
  • s -

    State machine pointer.

  • settings -

    Storage for settings.

Return:

Error code

GSM_Error GSM_SetCalendarSettings(GSM_StateMachine * s, GSM_CalendarSettings * settings)

Sets calendar settings.

Parameters:
  • s -

    State machine pointer.

  • settings -

    New calendar settings.

Return:

Error code

GSM_Error GSM_GetNotesStatus(GSM_StateMachine * s, GSM_ToDoStatus * status)

Retrieves notes status (number of used entries).

Parameters:
  • s -

    State machine pointer.

  • status -

    Storage for status.

Return:

Error code

GSM_Error GSM_GetNote(GSM_StateMachine * s, GSM_NoteEntry * Note)

Retrieves notes entry.

Parameters:
  • s -

    State machine pointer.

  • Note -

    Storage for note.

Return:

Error code

GSM_Error GSM_GetNextNote(GSM_StateMachine * s, GSM_NoteEntry * Note, gboolean start)

Retrieves note entry. This is useful for continuous reading of all notes entries.

Parameters:
  • s -

    State machine pointer.

  • Note -

    Storage for note, if start is FALSE, should contain data from previous read (at least position).

  • start -

    Whether we’re doing initial read or continue in reading.

Return:

Error code

GSM_Error GSM_SetNote(GSM_StateMachine * s, GSM_NoteEntry * Note)

Sets note entry

Parameters:
  • s -

    State machine pointer.

  • Note -

    New note values, needs to contain valid position.

Return:

Error code

GSM_Error GSM_AddNote(GSM_StateMachine * s, GSM_NoteEntry * Note)

Adds note entry.

Parameters:
  • s -

    State machine pointer.

  • Note -

    Note to add.

Return:

Error code

GSM_Error GSM_DeleteNote(GSM_StateMachine * s, GSM_NoteEntry * Note)

Deletes note entry.

Parameters:
  • s -

    State machine pointer.

  • Note -

    Note to delete, must contain position.

Return:

Error code

GSM_Error GSM_DeleteAllNotes(GSM_StateMachine * s)

Deletes all notes entries.

Parameters:
  • s -

    State machine pointer.

Return:

Error code

struct GSM_CalendarSettings

Calendar settings structure.

Public Members

int StartDay

Monday = 1, Tuesday = 2,...

int AutoDelete

0 = no delete, 1 = after day,...

struct GSM_ToDoStatus

Status of to do entries.

Public Members

int Free

Number of free positions.

int Used

Number of used positions.

struct GSM_CalendarStatus

Structure used for returning calendar status.

Public Members

int Free

Number of free positions.

int Used

Number of used positions.

GSM_CalendarNoteType enum

Enum defines types of calendar notes

Values:

  • GSM_CAL_REMINDER = 1 -

    Reminder or Date

  • GSM_CAL_CALL -

    Call

  • GSM_CAL_MEETING -

    Meeting

  • GSM_CAL_BIRTHDAY -

    Birthday or Anniversary or Special Occasion

  • GSM_CAL_MEMO -

    Memo or Miscellaneous

  • GSM_CAL_TRAVEL -

    Travel

  • GSM_CAL_VACATION -

    Vacation

  • GSM_CAL_T_ATHL -

    Training - Athletism

  • GSM_CAL_T_BALL -

    Training - Ball Games

  • GSM_CAL_T_CYCL -

    Training - Cycling

  • GSM_CAL_T_BUDO -

    Training - Budo

  • GSM_CAL_T_DANC -

    Training - Dance

  • GSM_CAL_T_EXTR -

    Training - Extreme Sports

  • GSM_CAL_T_FOOT -

    Training - Football

  • GSM_CAL_T_GOLF -

    Training - Golf

  • GSM_CAL_T_GYM -

    Training - Gym

  • GSM_CAL_T_HORS -

    Training - Horse Race

  • GSM_CAL_T_HOCK -

    Training - Hockey

  • GSM_CAL_T_RACE -

    Training - Races

  • GSM_CAL_T_RUGB -

    Training - Rugby

  • GSM_CAL_T_SAIL -

    Training - Sailing

  • GSM_CAL_T_STRE -

    Training - Street Games

  • GSM_CAL_T_SWIM -

    Training - Swimming

  • GSM_CAL_T_TENN -

    Training - Tennis

  • GSM_CAL_T_TRAV -

    Training - Travels

  • GSM_CAL_T_WINT -

    Training - Winter Games

  • GSM_CAL_ALARM -

    Alarm

  • GSM_CAL_DAILY_ALARM -

    Alarm repeating each day.

  • GSM_CAL_SHOPPING -

    Shopping

GSM_CalendarType enum

One value of calendar event.

Values:

  • CAL_START_DATETIME = 1 -

    Date and time of event start.

  • CAL_END_DATETIME -

    Date and time of event end.

  • CAL_TONE_ALARM_DATETIME -

    Alarm date and time.

  • CAL_SILENT_ALARM_DATETIME -

    Date and time of silent alarm.

  • CAL_TEXT -

    Text.

  • CAL_DESCRIPTION -

    Detailed description.

  • CAL_LOCATION -

    Location.

  • CAL_PHONE -

    Phone number.

  • CAL_PRIVATE -

    Whether this entry is private.

  • CAL_CONTACTID -

    Related contact id.

  • CAL_REPEAT_DAYOFWEEK -

    Repeat each x’th day of week.

  • CAL_REPEAT_DAY -

    Repeat each x’th day of month.

  • CAL_REPEAT_DAYOFYEAR -

    Repeat each x’th day of year.

  • CAL_REPEAT_WEEKOFMONTH -

    Repeat x’th week of month.

  • CAL_REPEAT_MONTH -

    Repeat x’th month.

  • CAL_REPEAT_FREQUENCY -

    Repeating frequency.

  • CAL_REPEAT_STARTDATE -

    Repeating start.

  • CAL_REPEAT_STOPDATE -

    Repeating end.

  • CAL_REPEAT_COUNT -

    Number of repetitions.

  • CAL_LUID -

    IrMC LUID which can be used for synchronisation.

  • CAL_LAST_MODIFIED -

    Date and time of last modification.

struct GSM_SubCalendarEntry

One value of calendar event.

Public Members

GSM_CalendarType EntryType

Type of value.

GSM_DateTime Date

Date and time of value, if applicable.

int Number

Number of value, if applicable.

GSM_Error AddError

During adding SubEntry Gammu can return here info, if it was done OK

unsigned char Text[(GSM_MAX_CALENDAR_TEXT_LENGTH+1)*2]

Text of value, if applicable.

struct GSM_CalendarEntry

Calendar note values.

Public Members

GSM_CalendarNoteType Type

Type of calendar note.

int Location

Location in memory.

int EntriesNum

Number of entries.

GSM_SubCalendarEntry Entries[GSM_CALENDAR_ENTRIES]

Values of entries.

GSM_ToDoType enum

Types of to do values. In parenthesis is member of GSM_SubToDoEntry, where value is stored.

Values:

  • TODO_END_DATETIME = 1 -

    Due date (Date).

  • TODO_COMPLETED -

    Whether is completed (Number).

  • TODO_ALARM_DATETIME -

    When should alarm be fired (Date).

  • TODO_SILENT_ALARM_DATETIME -

    When should silent alarm be fired (Date).

  • TODO_TEXT -

    Text of to do (Text).

  • TODO_DESCRIPTION -

    Description of to do (Text).

  • TODO_LOCATION -

    Location of to do (Text).

  • TODO_PRIVATE -

    Whether entry is private (Number).

  • TODO_CATEGORY -

    Category of entry (Number).

  • TODO_CONTACTID -

    Related contact ID (Number).

  • TODO_PHONE -

    Number to call (Text).

  • TODO_LUID -

    IrMC LUID which can be used for synchronisation (Text).

  • TODO_LAST_MODIFIED -

    Date and time of last modification (Date).

  • TODO_START_DATETIME -

    Start date (Date).

  • TODO_COMPLETED_DATETIME -

    Completed date (Date).

GSM_ToDo_Priority enum

Priority of to do.

Values:

  • GSM_Priority_None = 0 -
  • GSM_Priority_High -
  • GSM_Priority_Medium -
  • GSM_Priority_Low -
struct GSM_SubToDoEntry

Value of to do entry.

Public Members

GSM_ToDoType EntryType

Type of entry.

GSM_DateTime Date

Date of value, if appropriate, see GSM_ToDoType.

unsigned int Number

Number of value, if appropriate, see GSM_ToDoType.

unsigned char Text[(GSM_MAX_TODO_TEXT_LENGTH+1)*2]

Text of value, if appropriate, see GSM_ToDoType.

struct GSM_ToDoEntry

To do entry.

Public Members

GSM_CalendarNoteType Type

Type of todo note.

GSM_ToDo_Priority Priority

Priority of entry.

int Location

Location in memory.

int EntriesNum

Number of entries.

GSM_SubToDoEntry Entries[GSM_TODO_ENTRIES]

Values of current entry.

struct GSM_NoteEntry

Note entry.

Public Members

int Location

Location in memory.

char Text[(GSM_MAX_NOTE_TEXT_LENGTH+1)*2]

Text of note.

struct GSM_Alarm

Alarm values.

Public Members

int Location

Location where it is stored.

GSM_DateTime DateTime

Date and time of alarm.

gboolean Repeating

Whether it repeats each day.

unsigned char Text[(GSM_MAX_CALENDAR_TEXT_LENGTH+1)*2]

Text that is shown on display.

GSM_VToDoVersion enum

Format of vTodo.

Values:

  • Nokia_VToDo = 1 -

    Format compatible with Nokia - limited subsed of standard.

  • SonyEricsson_VToDo -

    Format compatible with SonyEricsson - complete standard.

  • Mozilla_VToDo -

    Format compatible with Mozilla - iCalendar based.

GSM_VCalendarVersion enum

Format of vCalendar export.

Values:

  • Nokia_VCalendar = 1 -

    vCalendar specially hacked for Nokia .

  • Siemens_VCalendar -

    vCalendar specially hacked for Siemens.

  • SonyEricsson_VCalendar -

    Standard vCalendar (which works for Sony-Ericsson phones)

  • Mozilla_iCalendar -

    iCalendar as compatible with Mozilla.

Previous topic

Bitmap

Next topic

Callback

This Page