Tizen Native API
3.0
|
The calendar common API provides the set of definitions and interfaces to initialize and deinitialize.
Required Header
#include <calendar.h>
Functions | |
int | calendar_connect (void) |
Connects to the calendar service. | |
int | calendar_disconnect (void) |
Disconnects from the calendar service. | |
int | calendar_connect_on_thread (void) |
Connects to the calendar service on a thread. | |
int | calendar_disconnect_on_thread (void) |
Disconnects from the calendar service on a thread. | |
int | calendar_connect_with_flags (unsigned int flags) |
Connects to the calendar service. |
Enumeration Type Documentation
enum calendar_error_e |
Enumeration for calendar errors.
- Since :
- 3.0
- Enumerator:
Function Documentation
int calendar_connect | ( | void | ) |
Connects to the calendar service.
- Since :
- 3.0
- Remarks:
- Opening the connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.
The execution of calendar_connect() and calendar_disconnect() could slow down your application, so you are recommended not to call them frequently.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Error from another modules
- See also:
- calendar_disconnect()
int calendar_connect_on_thread | ( | void | ) |
Connects to the calendar service on a thread.
- Since :
- 3.0
- Remarks:
- Opening a connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.
On a thread environment with calendar_connect(), request in one thread could fail, while another request connection is working in the other thread. To prevent request failure, calendar_connect_on_thread() is recommended.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method
- See also:
- calendar_disconnect_on_thread()
int calendar_connect_with_flags | ( | unsigned int | flags | ) |
Connects to the calendar service.
- Since :
- 3.0
- Remarks:
- Opening a connection is necessary to access the calendar database and perform operations such as fetching, inserting, or updating records.
Before the calendar-service daemon is ready, if you call calendar_connect(), it could fail. It is recommended to call this API with CALENDAR_CONNECT_FLAG_RETRY flags in such a situation.
- Parameters:
-
[in] flags calendar_connect_flag
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_OUT_OF_MEMORY Out of memory CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_PERMISSION_DENIED Permission denied. This application does not have the privilege to call this method. CALENDAR_ERROR_IPC Unknown IPC error CALENDAR_ERROR_SYSTEM Error from another modules
int calendar_disconnect | ( | void | ) |
Disconnects from the calendar service.
- Since :
- 3.0
- Remarks:
- If there is no open connection, this function returns CALENDAR_ERROR_DB_FAILED.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted CALENDAR_ERROR_IPC Unknown IPC error
- See also:
- calendar_connect()
int calendar_disconnect_on_thread | ( | void | ) |
Disconnects from the calendar service on a thread.
- Since :
- 3.0
- Remarks:
- If there is no open connection, this function returns CALENDAR_ERROR_DB_FAILED.
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
CALENDAR_ERROR_NONE Successful CALENDAR_ERROR_DB_FAILED Database operation failure CALENDAR_ERROR_INVALID_PARAMETER Invalid parameter CALENDAR_ERROR_NOT_PERMITTED Operation not permitted
- See also:
- calendar_connect_on_thread()