Skip to content
This repository
tree: ddc535e2e7
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 110 lines (100 sloc) 1.902 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
/**
* \file gammu-category.h
* \author Michal Čihař
*
* Categories handling.
*/
#ifndef __gammu_category_h
#define __gammu_category_h

/**
* \defgroup Category Category
* Categories handling.
*/

#include <gammu-limits.h>
#include <gammu-error.h>
#include <gammu-statemachine.h>

/**
* Type of category
*
* \ingroup Category
*/
typedef enum {
/**
* Todo entry category
*/
Category_ToDo = 1,
/**
* Phonebook entry category
*/
Category_Phonebook
} GSM_CategoryType;

/**
* Category entry.
* \ingroup Category
*/
typedef struct {
/**
* Type of category
*/
GSM_CategoryType Type;
/**
* Location of category
*/
int Location;
/**
* Name of category
*/
unsigned char Name[(GSM_MAX_CATEGORY_NAME_LENGTH + 1) * 2];
} GSM_Category;

/**
* Status of categories.
* \ingroup Category
*/
typedef struct {
/**
* Type of category.
*/
GSM_CategoryType Type;
/**
* Number of used category names.
*/
int Used;
} GSM_CategoryStatus;

/**
* Reads category from phone.
*
* \param s State machine pointer.
* \param Category Storage for category, containing its type and location.
*
* \return Error code
*
* \ingroup Category
*/
GSM_Error GSM_GetCategory(GSM_StateMachine * s, GSM_Category * Category);

/**
* Adds category to phone.
*
* \param s State machine pointer.
* \param Category New category, containing its type and location.
*
* \return Error code
*
* \ingroup Category
*/
GSM_Error GSM_AddCategory(GSM_StateMachine * s, GSM_Category * Category);

/**
* Reads category status (number of used entries) from phone.
*
* \param s State machine pointer.
* \param Status Category status, fill in type before calling.
*
* \return Error code
*
* \ingroup Category
*/
GSM_Error GSM_GetCategoryStatus(GSM_StateMachine * s,
GSM_CategoryStatus * Status);
#endif

/* Editor configuration
* vim: noexpandtab sw=8 ts=8 sts=8 tw=72:
*/
Something went wrong with that request. Please try again.