File: pinfile.h

package info (click to toggle)
scmxx 0.9.0-2.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,964 kB
  • ctags: 1,111
  • sloc: ansic: 11,892; sh: 2,784; xml: 2,690; makefile: 253
file content (38 lines) | stat: -rw-r--r-- 1,815 bytes parent folder | download | duplicates (5)
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
/***************************************************************************
 *   copyright           : (C) 2005 by Hendrik Sattler                     *
 *   mail                : post@hendrik-sattler.de                         *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef SCMXX_PIN_H
#define SCMXX_PIN_H

/* typical request strings:
 * "SIM PIN", "SIM PUK" (SIM PIN and PUK)
 * "SIM PIN2", "SIM PUK2" (SIM PIN 2 and PUK 2)
 * "PH-SIM PIN", "PH-SIM PUK" (theft protection PIN and PUK)
 *
 * There are device specific codes (SIM LOCK) but you
 * usually do not need them:
 * "PH-FSIM PIN", "PH-FSIM PUK" (Phone locked to very first inserted SIM)
 * "PH-NET PIN", "PH-NET PUK" (Network Personalization is actually a PUK)
 * "PH-NETSUB PIN", "PH-NETSUB PUK" (Network Subset Personalization is actually a PUK)
 * "PH-SP PIN", "PH-SP PUK" (Network Personalization is actually a PUK)
 * "PH-CORP PIN", "PH-CORP PUK" (Network Personalization is actually a PUK)
 * 
 * Other request are ignored:
 *
 * Return value (malloc'ed values):
 * "<PIN>" on a pin request (if pin is defined in file)
 * "<PUK>,<PIN>" on a puk request (if puk AND pin is defined in file)
 * "" if the pin file does not exist or the valid request cannot be processed
 * NULL on an invalid request
 */
char* pinfile_get (char* request);

#endif