223 |
{ "NHM-5", NULL, NK6100_CAP_PB_UNICODE }, /* 3310 */ |
{ "NHM-5", NULL, NK6100_CAP_PB_UNICODE }, /* 3310 */ |
224 |
{ "NHM-6", NULL, NK6100_CAP_PB_UNICODE }, /* 3330 */ |
{ "NHM-6", NULL, NK6100_CAP_PB_UNICODE }, /* 3330 */ |
225 |
{ "NHM-2", NULL, NK6100_CAP_PB_UNICODE }, /* 3410 */ |
{ "NHM-2", NULL, NK6100_CAP_PB_UNICODE }, /* 3410 */ |
226 |
{ "NSM-3D", NULL, NK6100_CAP_PB_UNICODE }, /* 8250 */ |
{ "NSM-3D", NULL, NK6100_CAP_PB_UNICODE | NK6100_CAP_CAL_UNICODE }, /* 8250 */ |
227 |
{ "RPM-1", "-4.23", NK6100_CAP_NBS_UPLOAD }, /* Card Phone 2.0 */ |
{ "RPM-1", "-4.23", NK6100_CAP_NBS_UPLOAD }, /* Card Phone 2.0 */ |
228 |
{ "NSE-8", NULL, NK6100_CAP_OLD_KEY_API | NK6100_CAP_NO_PSTATUS | NK6100_CAP_NO_CB }, /* 3210 */ |
{ "NSE-8", NULL, NK6100_CAP_OLD_KEY_API | NK6100_CAP_NO_PSTATUS | NK6100_CAP_NO_CB }, /* 3210 */ |
229 |
{ "NSE-9", NULL, NK6100_CAP_OLD_KEY_API }, /* 3210 */ |
{ "NSE-9", NULL, NK6100_CAP_OLD_KEY_API }, /* 3210 */ |
766 |
} |
} |
767 |
*pos++ = get_memory_type(pe->memory_type); |
*pos++ = get_memory_type(pe->memory_type); |
768 |
*pos++ = pe->location; |
*pos++ = pe->location; |
769 |
if (DRVINSTANCE(state)->capabilities & NK6100_CAP_PB_UNICODE) { |
if (DRVINSTANCE(state)->capabilities & NK6100_CAP_PB_UNICODE) |
770 |
namelen = char_unicode_encode(pos + 1, pe->name, namelen); |
namelen = char_unicode_encode(pos + 1, pe->name, namelen); |
771 |
*pos++ = namelen; |
else |
|
} else { |
|
772 |
namelen = pnok_string_encode(pos + 1, namelen, pe->name); |
namelen = pnok_string_encode(pos + 1, namelen, pe->name); |
773 |
*pos++ = namelen; |
*pos++ = namelen; |
|
} |
|
774 |
pos += namelen; |
pos += namelen; |
775 |
*pos++ = numlen; |
*pos++ = numlen; |
776 |
pnok_string_encode(pos, numlen, pe->number); |
pnok_string_encode(pos, numlen, pe->number); |
2427 |
0x00}; /* The type of calendar note */ |
0x00}; /* The type of calendar note */ |
2428 |
gn_calnote *note; |
gn_calnote *note; |
2429 |
unsigned char *pos; |
unsigned char *pos; |
2430 |
unsigned int numlen; |
unsigned int numlen, namelen; |
2431 |
|
|
2432 |
if (!data->calnote) |
if (!data->calnote) |
2433 |
return GN_ERR_UNKNOWN; |
return GN_ERR_UNKNOWN; |
2468 |
pos += 7; |
pos += 7; |
2469 |
} |
} |
2470 |
|
|
2471 |
|
/* FIXME: use some constant not 255 magic number */ |
2472 |
*pos = pnok_string_encode(pos+1, 255, note->text); |
if (DRVINSTANCE(state)->capabilities & NK6100_CAP_CAL_UNICODE) |
2473 |
pos += *pos+1; |
namelen = char_unicode_encode(pos + 1, note->text, 255); |
2474 |
|
else |
2475 |
|
namelen = pnok_string_encode(pos + 1, 255, note->text); |
2476 |
|
*pos++ = namelen; |
2477 |
|
pos += namelen; |
2478 |
|
|
2479 |
if (note->type == GN_CALNOTE_CALL) { |
if (note->type == GN_CALNOTE_CALL) { |
2480 |
*pos++ = numlen; |
*pos++ = numlen; |
2560 |
note->alarm.timestamp.second = *pos++; |
note->alarm.timestamp.second = *pos++; |
2561 |
note->alarm.enabled = (note->alarm.timestamp.year != 0); |
note->alarm.enabled = (note->alarm.timestamp.year != 0); |
2562 |
n = *pos++; |
n = *pos++; |
2563 |
pnok_string_decode(note->text, sizeof(note->text), pos, n); |
if ((DRVINSTANCE(state)->capabilities & NK6100_CAP_CAL_UNICODE)) |
2564 |
|
char_unicode_decode(note->text, pos, n); |
2565 |
|
else |
2566 |
|
pnok_string_decode(note->text, sizeof(note->text), pos, n); |
2567 |
pos += n; |
pos += n; |
2568 |
|
|
2569 |
if (note->type == GN_CALNOTE_CALL) { |
if (note->type == GN_CALNOTE_CALL) { |