Lines Matching +refs:note +refs:error +refs:location
732 if ((data->phonebook_entry->location < 0) || (data->phonebook_entry->location > 255)) in ReadPhonebook()
735 …honebook location (%d/%d)\n", data->phonebook_entry->memory_type, data->phonebook_entry->location); in ReadPhonebook()
737 req[5] = data->phonebook_entry->location; in ReadPhonebook()
752 if ((data->phonebook_entry->location < 0) || (data->phonebook_entry->location > 255)) in WritePhonebook()
759 dprintf("Writing phonebook location (%d/%d): %s\n", pe->memory_type, pe->location, pe->name); in WritePhonebook()
780 *pos++ = pe->location; in WritePhonebook()
806 entry.location = data->phonebook_entry->location; in DeletePhonebook()
865 if ((data->speed_dial->location < 0) || (data->speed_dial->location > 255)) in SetSpeedDial()
873 req[6] = data->speed_dial->location; in SetSpeedDial()
1057 data->speed_dial->location = message[5]; in IncomingPhonebook()
1104 gn_error error; in Authentication() local
1120 if ((error = sm_message_send(7, 0x02, connect1, state)) != GN_ERR_NONE) in Authentication()
1121 return error; in Authentication()
1122 if ((error = sm_block(0x02, &data, state)) != GN_ERR_NONE) in Authentication()
1123 return error; in Authentication()
1125 if ((error = sm_message_send(5, 0x02, connect2, state)) != GN_ERR_NONE) in Authentication()
1126 return error; in Authentication()
1127 if ((error = sm_block(0x02, &data, state)) != GN_ERR_NONE) in Authentication()
1128 return error; in Authentication()
1130 if ((error = sm_message_send(7, 0x02, connect3, state)) != GN_ERR_NONE) in Authentication()
1131 return error; in Authentication()
1132 if ((error = sm_block(0x02, &data, state)) != GN_ERR_NONE) in Authentication()
1133 return error; in Authentication()
1135 if ((error = PhoneInfo(&data, state)) != GN_ERR_NONE) return error; in Authentication()
1139 if ((error = sm_message_send(45, 0x64, magic_connect, state)) != GN_ERR_NONE) in Authentication()
1140 return error; in Authentication()
1351 gn_error error; in SendSMSMessage() local
1368 error = sm_block_no_retry_timeout(PNOK_MSG_ID_SMS, state->config.smsc_timeout, data, state); in SendSMSMessage()
1369 } while (!state->config.smsc_timeout && error == GN_ERR_TIMEOUT); in SendSMSMessage()
1371 return error; in SendSMSMessage()
1379 gn_error error; in CheckIncomingSMS() local
1403 if ((error = gn_sms_get(&data, state)) != GN_ERR_NONE) { in CheckIncomingSMS()
1455 gn_error error; in IncomingSMS1() local
1468 error = isdn_cause2gn_error(NULL, NULL, message[5], message[6]); in IncomingSMS1()
1469 switch (error) { in IncomingSMS1()
1473 return error; in IncomingSMS1()
1680 gn_error error; in GetSMSFolderStatus() local
1688 error = GetSMSFolders(data, state); in GetSMSFolderStatus()
1689 if (error != GN_ERR_NONE) return error; in GetSMSFolderStatus()
1693 error = GetSMSStatus(data, state); in GetSMSFolderStatus()
1695 if (error != GN_ERR_NONE) return error; in GetSMSFolderStatus()
2066 gn_error error; in GetProfile() local
2078 if ((error = sm_block(0x05, data, state))) in GetProfile()
2079 return error; in GetProfile()
2082 if ((error = GetProfileFeature(i, data, state))) in GetProfile()
2083 return error; in GetProfile()
2141 gn_error error; in SetProfile() local
2170 if ((error = sm_block(0x05, data, state))) in SetProfile()
2171 return error; in SetProfile()
2173 error = SetProfileFeature(data, state, 0x00, prof->keypad_tone); in SetProfile()
2174 error |= SetProfileFeature(data, state, 0x01, prof->lights); in SetProfile()
2175 error |= SetProfileFeature(data, state, 0x02, prof->call_alert); in SetProfile()
2176 error |= SetProfileFeature(data, state, 0x03, prof->ringtone); in SetProfile()
2177 error |= SetProfileFeature(data, state, 0x04, prof->volume); in SetProfile()
2178 error |= SetProfileFeature(data, state, 0x05, prof->message_tone); in SetProfile()
2179 error |= SetProfileFeature(data, state, 0x06, prof->vibration); in SetProfile()
2180 error |= SetProfileFeature(data, state, 0x07, prof->warning_tone); in SetProfile()
2181 error |= SetProfileFeature(data, state, 0x08, prof->caller_groups); in SetProfile()
2182 error |= SetProfileFeature(data, state, 0x09, prof->automatic_answer); in SetProfile()
2184 return (error == GN_ERR_NONE) ? GN_ERR_NONE : GN_ERR_UNKNOWN; in SetProfile()
2214 if (data->ringtone->location < 0) data->ringtone->location = 17; in SetRingtone()
2217 data->ringtone->location = -1; in SetRingtone()
2223 req[4] = data->ringtone->location - 17; in SetRingtone()
2646 if ((data->calnote->location < 0) || (data->calnote->location > 255)) in GetCalendarNote()
2649 req[4] = data->calnote->location; in GetCalendarNote()
2660 gn_calnote *note; in WriteCalendarNote() local
2666 if ((data->calnote->location < 0) || (data->calnote->location > 255)) in WriteCalendarNote()
2669 note = data->calnote; in WriteCalendarNote()
2671 numlen = strlen(note->phone_number); in WriteCalendarNote()
2676 switch (note->type) { in WriteCalendarNote()
2684 *pos++ = note->time.year >> 8; in WriteCalendarNote()
2685 *pos++ = note->time.year & 0xff; in WriteCalendarNote()
2686 *pos++ = note->time.month; in WriteCalendarNote()
2687 *pos++ = note->time.day; in WriteCalendarNote()
2688 *pos++ = note->time.hour; in WriteCalendarNote()
2689 *pos++ = note->time.minute; in WriteCalendarNote()
2690 *pos++ = note->time.timezone; in WriteCalendarNote()
2692 if (note->alarm.timestamp.year) { in WriteCalendarNote()
2693 *pos++ = note->alarm.timestamp.year >> 8; in WriteCalendarNote()
2694 *pos++ = note->alarm.timestamp.year & 0xff; in WriteCalendarNote()
2695 *pos++ = note->alarm.timestamp.month; in WriteCalendarNote()
2696 *pos++ = note->alarm.timestamp.day; in WriteCalendarNote()
2697 *pos++ = note->alarm.timestamp.hour; in WriteCalendarNote()
2698 *pos++ = note->alarm.timestamp.minute; in WriteCalendarNote()
2699 *pos++ = note->alarm.timestamp.timezone; in WriteCalendarNote()
2709 namelen = pnok_string_encode(pos + 2, 255, note->text); in WriteCalendarNote()
2714 namelen = char_unicode_encode(pos + 1, note->text, 255); in WriteCalendarNote()
2716 namelen = pnok_string_encode(pos + 1, 255, note->text); in WriteCalendarNote()
2721 if (note->type == GN_CALNOTE_CALL) { in WriteCalendarNote()
2723 memcpy(pos, note->phone_number, numlen); in WriteCalendarNote()
2737 if ((data->calnote->location < 0) || (data->calnote->location > 255)) in DeleteCalendarNote()
2740 req[4] = data->calnote->location; in DeleteCalendarNote()
2748 gn_calnote *note; in IncomingCalendar() local
2788 note = data->calnote; in IncomingCalendar()
2793 case 0x01: note->type = GN_CALNOTE_REMINDER; break; in IncomingCalendar()
2794 case 0x02: note->type = GN_CALNOTE_CALL; break; in IncomingCalendar()
2795 case 0x03: note->type = GN_CALNOTE_MEETING; break; in IncomingCalendar()
2796 case 0x04: note->type = GN_CALNOTE_BIRTHDAY; break; in IncomingCalendar()
2799 note->time.year = (pos[0] << 8) + pos[1]; in IncomingCalendar()
2801 note->time.month = *pos++; in IncomingCalendar()
2802 note->time.day = *pos++; in IncomingCalendar()
2803 note->time.hour = *pos++; in IncomingCalendar()
2804 note->time.minute = *pos++; in IncomingCalendar()
2805 note->time.second = *pos++; in IncomingCalendar()
2807 note->alarm.timestamp.year = (pos[0] << 8) + pos[1]; in IncomingCalendar()
2809 note->alarm.timestamp.month = *pos++; in IncomingCalendar()
2810 note->alarm.timestamp.day = *pos++; in IncomingCalendar()
2811 note->alarm.timestamp.hour = *pos++; in IncomingCalendar()
2812 note->alarm.timestamp.minute = *pos++; in IncomingCalendar()
2813 note->alarm.timestamp.second = *pos++; in IncomingCalendar()
2814 note->alarm.enabled = (note->alarm.timestamp.year != 0); in IncomingCalendar()
2822 char_unicode_decode(note->text, pos, n); in IncomingCalendar()
2824 pnok_string_decode(note->text, sizeof(note->text), pos, n); in IncomingCalendar()
2827 if (note->type == GN_CALNOTE_CALL) { in IncomingCalendar()
2830 pnok_string_decode(note->phone_number, sizeof(note->phone_number), pos, n); in IncomingCalendar()
2833 note->phone_number[0] = 0; in IncomingCalendar()
2837 if (note->time.year == 2090) { in IncomingCalendar()
2838 note->time.year = note->alarm.timestamp.year; in IncomingCalendar()
2845 memset(¬e->end_time, 0, sizeof(note->end_time)); in IncomingCalendar()
2846 note->mlocation[0] = 0; in IncomingCalendar()
3024 gn_error error; in GetRawRingtone() local
3027 if (data->ringtone->location < 0) return GN_ERR_INVALIDLOCATION; in GetRawRingtone()
3029 req[3] = data->ringtone->location - 17; in GetRawRingtone()
3031 if ((error = pnok_extended_cmds_enable(0x01, data, state))) return error; in GetRawRingtone()
3044 gn_error error; in SetRawRingtone() local
3049 if (data->ringtone->location < 0) data->ringtone->location = 17; in SetRawRingtone()
3051 req[3] = data->ringtone->location - 17; in SetRawRingtone()
3062 if ((error = pnok_extended_cmds_enable(0x01, data, state))) return error; in SetRawRingtone()
3078 ringtone.location = (data->ringtone->location < 0) ? 17 : data->ringtone->location; in DeleteRingtone()
3175 data->ringtone->location = message[3] + 17; in IncomingSecurity()
3835 gn_error error; in BuildKeytable() local
3856 if ((error = sm_block(0x0c, &data, state))) return error; in BuildKeytable()
3872 gn_error error; in PressKey() local
3878 if ((error = PressOrReleaseKey(true, &data, state))) return error; in PressKey()
3880 if ((error = PressOrReleaseKey(false, &data, state))) return error; in PressKey()
3888 gn_error error; in EnterChar() local
3913 if ((error = PressKey(GN_KEY_HASH, 0, state))) return error; in EnterChar()
3928 if ((error = PressKey(GN_KEY_ASTERISK, 0, state))) return error; in EnterChar()
3938 if ((error = PressKey(key, 0, state))) return error; in EnterChar()
3947 if ((error = PressKey(GN_KEY_HASH, 0, state))) return error; in EnterChar()
3951 if ((error = PressKey(GN_KEY_MENU, 0, state))) return error; in EnterChar()
3960 if ((error = PressKey(GN_KEY_HASH, 0, state))) return error; in EnterChar()
3961 if ((error = PressKey(GN_KEY_HASH, 0, state))) return error; in EnterChar()
4064 gn_error error; in get_ringtone_list() local
4067 rl->ringtone[rl->count].location = (id); \ in get_ringtone_list()
4082 ringtone.location = rl->userdef_location + rl->userdef_count; in get_ringtone_list()
4083 error = GetRingtone(&d, state); in get_ringtone_list()
4084 if (error == GN_ERR_NONE) { in get_ringtone_list()
4086 } else if (error == GN_ERR_WRONGDATAFORMAT) { in get_ringtone_list()
4090 rl->ringtone[rl->count].location = ringtone.location; in get_ringtone_list()