Translation update done using Pootle.
[gammu.git] / include / gammu-security.h
blobe4c82b2a0113d15b116acff06e1041c0853af7d6
1 /**
2 * \file gammu-security.h
3 * \author Michal Čihař
5 * Security functions.
6 */
7 #ifndef __gammu_security_h
8 #define __gammu_security_h
10 /**
11 * \defgroup Security Security
12 * Security related operations with phone.
15 #include <gammu-limits.h>
16 #include <gammu-error.h>
17 #include <gammu-statemachine.h>
19 /**
20 * Definition of security codes.
22 * \ingroup Security
24 typedef enum {
25 /**
26 * Security code.
28 SEC_SecurityCode = 0x01,
29 /**
30 * PIN.
32 SEC_Pin,
33 /**
34 * PIN 2.
36 SEC_Pin2,
37 /**
38 * PUK.
40 SEC_Puk,
41 /**
42 * PUK 2.
44 SEC_Puk2,
45 /**
46 * Code not needed.
48 SEC_None,
49 /**
50 * Phone code needed.
52 SEC_Phone,
53 /**
54 * Network code needed.
56 SEC_Network,
57 } GSM_SecurityCodeType;
59 /**
60 * Security code definition.
62 * \ingroup Security
64 typedef struct {
65 /**
66 * Type of the code.
68 GSM_SecurityCodeType Type;
69 /**
70 * Actual code.
72 char Code[GSM_SECURITY_CODE_LEN + 1];
73 /**
74 * New PIN code.
76 * Some phones require to set PIN on entering PUK, you can
77 * provide it here.
79 char NewPIN[GSM_SECURITY_CODE_LEN + 1];
80 } GSM_SecurityCode;
82 /**
83 * Enters security code (PIN, PUK,...) .
85 * \ingroup Security
87 GSM_Error GSM_EnterSecurityCode(GSM_StateMachine * s, GSM_SecurityCode * Code);
89 /**
90 * Queries whether some security code needs to be entered.
92 * \ingroup Security
94 GSM_Error GSM_GetSecurityStatus(GSM_StateMachine * s,
95 GSM_SecurityCodeType * Status);
97 #endif
99 /* Editor configuration
100 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: