Translation update done using Pootle.
[gammu.git] / include / gammu-category.h
blobed6d5ffd2acedf4e551492445241d8e3bbe95f3e
1 /**
2 * \file gammu-category.h
3 * \author Michal Čihař
5 * Categories handling.
6 */
7 #ifndef __gammu_category_h
8 #define __gammu_category_h
10 /**
11 * \defgroup Category Category
12 * Categories handling.
15 #include <gammu-limits.h>
16 #include <gammu-error.h>
17 #include <gammu-statemachine.h>
19 /**
20 * Type of category
22 * \ingroup Category
24 typedef enum {
25 /**
26 * Todo entry category
28 Category_ToDo = 1,
29 /**
30 * Phonebook entry category
32 Category_Phonebook
33 } GSM_CategoryType;
35 /**
36 * Category entry.
37 * \ingroup Category
39 typedef struct {
40 /**
41 * Type of category
43 GSM_CategoryType Type;
44 /**
45 * Location of category
47 int Location;
48 /**
49 * Name of category
51 unsigned char Name[(GSM_MAX_CATEGORY_NAME_LENGTH + 1) * 2];
52 } GSM_Category;
54 /**
55 * Status of categories.
56 * \ingroup Category
58 typedef struct {
59 /**
60 * Type of category.
62 GSM_CategoryType Type;
63 /**
64 * Number of used category names.
66 int Used;
67 } GSM_CategoryStatus;
69 /**
70 * Reads category from phone.
72 * \param s State machine pointer.
73 * \param Category Storage for category, containing its type and location.
75 * \return Error code
77 * \ingroup Category
79 GSM_Error GSM_GetCategory(GSM_StateMachine * s, GSM_Category * Category);
81 /**
82 * Adds category to phone.
84 * \param s State machine pointer.
85 * \param Category New category, containing its type and location.
87 * \return Error code
89 * \ingroup Category
91 GSM_Error GSM_AddCategory(GSM_StateMachine * s, GSM_Category * Category);
93 /**
94 * Reads category status (number of used entries) from phone.
96 * \param s State machine pointer.
97 * \param Status Category status, fill in type before calling.
99 * \return Error code
101 * \ingroup Category
103 GSM_Error GSM_GetCategoryStatus(GSM_StateMachine * s,
104 GSM_CategoryStatus * Status);
105 #endif
107 /* Editor configuration
108 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: