Gammu internals  1.38.0
Category

Data Structures

struct  GSM_Category
 
struct  GSM_CategoryStatus
 

Enumerations

enum  GSM_CategoryType { Category_ToDo = 1, Category_Phonebook }
 

Functions

GSM_Error GSM_GetCategory (GSM_StateMachine *s, GSM_Category *Category)
 
GSM_Error GSM_AddCategory (GSM_StateMachine *s, GSM_Category *Category)
 
GSM_Error GSM_GetCategoryStatus (GSM_StateMachine *s, GSM_CategoryStatus *Status)
 
GSM_Error GSM_GetDateTime (GSM_StateMachine *s, GSM_DateTime *date_time)
 
GSM_Error GSM_SetDateTime (GSM_StateMachine *s, GSM_DateTime *date_time)
 

Detailed Description

Categories handling.

Enumeration Type Documentation

§ GSM_CategoryType

Type of category

Enumerator
Category_ToDo 

Todo entry category

Category_Phonebook 

Phonebook entry category

Definition at line 28 of file gammu-category.h.

Function Documentation

§ GSM_AddCategory()

GSM_Error GSM_AddCategory ( GSM_StateMachine s,
GSM_Category Category 
)

Adds category to phone.

Parameters
sState machine pointer.
CategoryNew category, containing its type and location.
Returns
Error code

Adds category to phone.

Definition at line 476 of file api.c.

References GSM_Phone_Functions::AddCategory, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

477 {
478  GSM_Error err;
479 
481 
482  err = s->Phone.Functions->AddCategory(s, Category);
483  PRINT_LOG_ERROR(err);
484  return err;
485 }
GSM_Error(* AddCategory)(GSM_StateMachine *s, GSM_Category *Category)
Definition: gsmstate.h:882
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetCategory()

GSM_Error GSM_GetCategory ( GSM_StateMachine s,
GSM_Category Category 
)

Reads category from phone.

Parameters
sState machine pointer.
CategoryStorage for category, containing its type and location.
Returns
Error code

Reads category from phone.

Definition at line 463 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetCategory, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

464 {
465  GSM_Error err;
466 
468 
469  err = s->Phone.Functions->GetCategory(s, Category);
470  PRINT_LOG_ERROR(err);
471  return err;
472 }
GSM_Error(* GetCategory)(GSM_StateMachine *s, GSM_Category *Category)
Definition: gsmstate.h:878
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetCategoryStatus()

GSM_Error GSM_GetCategoryStatus ( GSM_StateMachine s,
GSM_CategoryStatus Status 
)

Reads category status (number of used entries) from phone.

Parameters
sState machine pointer.
StatusCategory status, fill in type before calling.
Returns
Error code

Reads category status (number of used entries) from phone.

Definition at line 489 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetCategoryStatus, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

490 {
491  GSM_Error err;
492 
494 
495  err = s->Phone.Functions->GetCategoryStatus(s, Status);
496  PRINT_LOG_ERROR(err);
497  return err;
498 }
GSM_Error
Definition: gammu-error.h:23
GSM_Error(* GetCategoryStatus)(GSM_StateMachine *s, GSM_CategoryStatus *Status)
Definition: gsmstate.h:886
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_GetDateTime()

GSM_Error GSM_GetDateTime ( GSM_StateMachine s,
GSM_DateTime date_time 
)

Reads date and time from phone.

Parameters
sState machine pointer.
date_timeStorage for date.
Returns
Error code

Reads date and time from phone.

Definition at line 229 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetDateTime, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.

230 {
231  GSM_Error err;
232 
234 
235  err = s->Phone.Functions->GetDateTime(s, date_time);
236  PRINT_LOG_ERROR(err);
237  return err;
238 }
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Error(* GetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: gsmstate.h:814
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373

§ GSM_SetDateTime()

GSM_Error GSM_SetDateTime ( GSM_StateMachine s,
GSM_DateTime date_time 
)

Sets date and time in phone.

Parameters
sState machine pointer.
date_timeDate to set.
Returns
Error code

Sets date and time in phone.

Definition at line 242 of file api.c.

References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetDateTime.

243 {
244  GSM_Error err;
245 
247 
248  err = s->Phone.Functions->SetDateTime(s, date_time);
249  PRINT_LOG_ERROR(err);
250  return err;
251 }
GSM_Error(* SetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: gsmstate.h:818
GSM_Error
Definition: gammu-error.h:23
GSM_Phone Phone
Definition: gsmstate.h:1431
#define PRINT_LOG_ERROR(err)
Definition: api.c:28
#define CHECK_PHONE_CONNECTION()
Definition: api.c:38
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373