Gammu internals  1.38.0
Security

Data Structures

struct  GSM_SecurityCode
 

Enumerations

enum  GSM_SecurityCodeType {
  SEC_SecurityCode = 0x01, SEC_Pin, SEC_Pin2, SEC_Puk,
  SEC_Puk2, SEC_None, SEC_Phone, SEC_Network
}
 

Functions

GSM_Error GSM_EnterSecurityCode (GSM_StateMachine *s, GSM_SecurityCode *Code)
 
GSM_Error GSM_GetSecurityStatus (GSM_StateMachine *s, GSM_SecurityCodeType *Status)
 

Detailed Description

Security related operations with phone.

Enumeration Type Documentation

§ GSM_SecurityCodeType

Definition of security codes.

Enumerator
SEC_SecurityCode 

Security code.

SEC_Pin 

PIN.

SEC_Pin2 

PIN 2.

SEC_Puk 

PUK.

SEC_Puk2 

PUK 2.

SEC_None 

Code not needed.

SEC_Phone 

Phone code needed.

SEC_Network 

Network code needed.

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

Function Documentation

§ GSM_EnterSecurityCode()

GSM_Error GSM_EnterSecurityCode ( GSM_StateMachine s,
GSM_SecurityCode Code 
)

Enters security code (PIN, PUK,...) .

Definition at line 359 of file api.c.

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

360 {
361  GSM_Error err;
362 
364 
365  err = s->Phone.Functions->EnterSecurityCode(s, Code);
366  PRINT_LOG_ERROR(err);
367  return err;
368 }
GSM_Error(* EnterSecurityCode)(GSM_StateMachine *s, GSM_SecurityCode *Code)
Definition: gsmstate.h:850
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_GetSecurityStatus()

GSM_Error GSM_GetSecurityStatus ( GSM_StateMachine s,
GSM_SecurityCodeType Status 
)

Queries whether some security code needs to be entered.

Queries whether some security code needs to be entered./

Definition at line 372 of file api.c.

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

373 {
374  GSM_Error err;
375 
377 
378  err = s->Phone.Functions->GetSecurityStatus(s, Status);
379  PRINT_LOG_ERROR(err);
380  return err;
381 }
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(* GetSecurityStatus)(GSM_StateMachine *s, GSM_SecurityCodeType *Status)
Definition: gsmstate.h:854
GSM_Phone_Functions * Functions
Definition: gsmstate.h:1373