nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
icalendar_parser.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef ICAL_PARSER_H__
8#define ICAL_PARSER_H__
9
10#include <zephyr/kernel.h>
11#include <zephyr/types.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
39};
40
59};
60
66 char summary[CONFIG_ICAL_PARSER_SUMMARY_SIZE + 1];
68 char location[CONFIG_ICAL_PARSER_LOCATION_SIZE + 1];
70 char description[CONFIG_ICAL_PARSER_DESCRIPTION_SIZE + 1];
72 char dtstart[CONFIG_ICAL_PARSER_DTSTART_SIZE + 1];
74 char dtend[CONFIG_ICAL_PARSER_DTEND_SIZE + 1];
75};
76
87};
88
101 const struct ical_parser_evt *event);
102
108 char buf[CONFIG_ICAL_PARSER_BUFFER_SIZE + 1];
110 size_t offset;
115};
116
127
138 const char *data, size_t len);
139
142#ifdef __cplusplus
143}
144#endif
145
146#endif /* ICAL_PARSER_H__ */
size_t ical_parser_parse(struct icalendar_parser *ical, const char *data, size_t len)
Parse the iCalendar data stream. Return the parsed bytes.
int ical_parser_init(struct icalendar_parser *ical, icalendar_parser_callback_t callback)
Initialize iCalendar parser.
ical_parser_evt_id
iCalendar parser event IDs.
Definition: icalendar_parser.h:28
@ ICAL_EVT_VTODO
Definition: icalendar_parser.h:32
@ ICAL_EVT_VFREEBUSY
Definition: icalendar_parser.h:38
@ ICAL_EVT_VEVENT
Definition: icalendar_parser.h:30
@ ICAL_EVT_VJOURNAL
Definition: icalendar_parser.h:34
@ ICAL_EVT_VTIMEZONE
Definition: icalendar_parser.h:36
int(* icalendar_parser_callback_t)(const struct ical_parser_evt *event)
iCalendar parser asynchronous event handler.
Definition: icalendar_parser.h:100
ical_parser_error_id
iCalendar parser error IDs.
Definition: icalendar_parser.h:44
@ ICAL_ERROR_COM_NOT_SUPPORTED
Definition: icalendar_parser.h:58
@ ICAL_ERROR_DESCRIPTION
Definition: icalendar_parser.h:52
@ ICAL_ERROR_DTEND
Definition: icalendar_parser.h:56
@ ICAL_ERROR_LOCATION
Definition: icalendar_parser.h:50
@ ICAL_ERROR_NONE
Definition: icalendar_parser.h:46
@ ICAL_ERROR_DTSTART
Definition: icalendar_parser.h:54
@ ICAL_ERROR_SUMMARY
Definition: icalendar_parser.h:48
char description[CONFIG_ICAL_PARSER_DESCRIPTION_SIZE+1]
Definition: icalendar_parser.h:70
char dtstart[CONFIG_ICAL_PARSER_DTSTART_SIZE+1]
Definition: icalendar_parser.h:72
char summary[CONFIG_ICAL_PARSER_SUMMARY_SIZE+1]
Definition: icalendar_parser.h:66
char location[CONFIG_ICAL_PARSER_LOCATION_SIZE+1]
Definition: icalendar_parser.h:68
char dtend[CONFIG_ICAL_PARSER_DTEND_SIZE+1]
Definition: icalendar_parser.h:74
iCalendar component.
Definition: icalendar_parser.h:64
enum ical_parser_evt_id id
Definition: icalendar_parser.h:82
enum ical_parser_error_id error
Definition: icalendar_parser.h:84
struct ical_component ical_com
Definition: icalendar_parser.h:86
iCalendar parser event.
Definition: icalendar_parser.h:80
char buf[CONFIG_ICAL_PARSER_BUFFER_SIZE+1]
Definition: icalendar_parser.h:108
bool icalobject_begin
Definition: icalendar_parser.h:112
icalendar_parser_callback_t callback
Definition: icalendar_parser.h:114
size_t offset
Definition: icalendar_parser.h:110
iCalendar parser instance.
Definition: icalendar_parser.h:106