Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/FeliCa2Money-1/felicaint.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 204 - (show annotations) (download) (as text)
Sun May 18 04:21:26 2008 UTC (15 years, 10 months ago) by tmurakam
File MIME type: text/x-chdr
File size: 5071 byte(s)
Move older version (ver 1.x)

1 /*
2 felicalib - FeliCa access wrapper library
3
4 Copyright (c) 2007, Takuya Murakami, All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are
8 met:
9
10 1. Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer.
12
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16
17 3. Neither the name of the project nor the names of its contributors
18 may be used to endorse or promote products derived from this software
19 without specific prior written permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33 /**
34 @file felicaint.h
35
36 �����w�b�_
37 */
38
39 #ifndef _FELICAINT_H
40 #define _FELICAINT_H
41
42 /** @brief Polling �\���� */
43 typedef struct {
44 uint8* system_code; ///< �V�X�e���R�[�h (2byte, �l�b�g���[�N�o�C�g�I�[�_)
45 uint8 time_slot; ///< �^�C���X���b�g (0x00, 0x01, 0x03, 0x07, 0x0f ����������)
46 } POLLING;
47
48 /** @brief �J�[�h�����\���� */
49 typedef struct {
50 uint8* card_idm; ///< �J�[�h�� IDm (8byte)
51 uint8* card_pmm; ///< �J�[�h�� PMm (8byte)
52 } CARD_INFO;
53
54 /** @brief read_block_without_encryption �����\���� */
55 typedef struct {
56 uint8 *card_idm; ///< IDm
57 uint8 number_of_services; ///< �T�[�r�X�R�[�h��
58 uint8 *service_code_list; ///< �T�[�r�X�R�[�h���X�g
59 uint8 number_of_blocks; ///< �u���b�N��
60 uint8 *block_list; ///< �u���b�N���X�g
61 } INSTR_READ_BLOCK;
62
63 /** @brief read_block_without_encryption �o���\���� */
64 typedef struct {
65 uint8 *status_flag_1; ///< �X�e�[�^�X�t���O1
66 uint8 *status_flag_2; ///< �X�e�[�^�X�t���O2
67 uint8 *result_number_of_blocks; ///< �f�[�^�u���b�N��
68 uint8 *block_data; ///< �f�[�^�u���b�N
69 } OUTSTR_READ_BLOCK;
70
71 /** @brief polling_and_request_system_code �����\���� */
72 typedef struct {
73 uint8 *card_idm; ///< IDm
74 } INSTR_REQ_SYSTEM_CODE;
75
76 /** @brief polling_and_request_system_code �o���\���� */
77 typedef struct {
78 uint8 number_of_system_codes; ///< �V�X�e���R�[�h��
79 uint8 *system_code_list; ///< �V�X�e���R�[�h�z��
80 } OUTSTR_REQ_SYSTEM_CODE;
81
82 /** @brief polling_and_search_service_code �����\���� */
83 typedef struct {
84 int buffer_size_of_area_codes; ///< �G���A�R�[�h�o�b�t�@�T�C�Y
85 int buffer_size_of_service_codes; ///< �T�[�r�X�R�[�h�o�b�t�@�T�C�Y
86 int offset_of_area_service_index; ///< �G���A�T�[�r�X�I�t�Z�b�g(?)
87 } INSTR_SEARCH_SERVICE;
88
89 /** @brief polling_and_search_service_code �o���\���� */
90 typedef struct {
91 int num_service_codes; ///< �T�[�r�X�R�[�h��
92 uint8 *service_code_list; ///< �T�[�r�X�R�[�h�z��
93 int num_area_codes; ///< �G���A�R�[�h��
94 uint8 *area_code_list; ///< �G���A�R�[�h�z��
95 uint8 *end_service_code_list; ///< �G���h�T�[�r�X�R�[�h�z��
96 } OUTSTR_SEARCH_SERVICE;
97
98 /* DLL entries */
99 typedef BOOL (*initialize_library_t)(void);
100 typedef BOOL (*dispose_library_t)(void);
101 typedef BOOL (*open_reader_writer_auto_t)(void);
102 typedef BOOL (*close_reader_writer_t)(void);
103 typedef BOOL (*polling_and_get_card_information_t)(POLLING *, unsigned char *, CARD_INFO *);
104 typedef BOOL (*polling_and_request_system_code_t)(POLLING *, INSTR_REQ_SYSTEM_CODE *,
105 CARD_INFO *, OUTSTR_REQ_SYSTEM_CODE *);
106 typedef BOOL (*polling_and_search_service_code_t)(POLLING *, INSTR_SEARCH_SERVICE *,
107 CARD_INFO *, OUTSTR_SEARCH_SERVICE *);
108 typedef BOOL (*read_block_without_encryption_t)(INSTR_READ_BLOCK *, OUTSTR_READ_BLOCK *);
109
110 /* structures */
111 /**
112 @brief PaSoRi �n���h��
113
114 felica.dll �� DLL �n���h���A������ DLL ���G���g���|�C���g�����������B
115 */
116 struct strpasori {
117 HINSTANCE hInstDLL; ///< DLL �n���h��
118
119 #define declare_entry(f) f ## _t f
120 declare_entry(initialize_library);
121 declare_entry(dispose_library);
122 declare_entry(open_reader_writer_auto);
123 declare_entry(close_reader_writer);
124 declare_entry(polling_and_get_card_information);
125 declare_entry(polling_and_request_system_code);
126 declare_entry(polling_and_search_service_code);
127 declare_entry(read_block_without_encryption);
128 #undef declare_entry
129 };
130
131 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26