| 1080 | } |
| 1081 | |
| 1082 | static uint64_t get_mod_sequence_value(mailimap * session) |
| 1083 | { |
| 1084 | uint64_t mod_sequence_value; |
| 1085 | clistiter * cur; |
| 1086 | |
| 1087 | mod_sequence_value = 0; |
| 1088 | for(cur = clist_begin(session->imap_response_info->rsp_extension_list) ; cur != NULL ; cur = clist_next(cur)) { |
| 1089 | struct mailimap_extension_data * ext_data; |
| 1090 | struct mailimap_condstore_resptextcode * resptextcode; |
| 1091 | |
| 1092 | ext_data = (struct mailimap_extension_data *) clist_content(cur); |
| 1093 | if (ext_data->ext_extension->ext_id != MAILIMAP_EXTENSION_CONDSTORE) { |
| 1094 | continue; |
| 1095 | } |
| 1096 | if (ext_data->ext_type != MAILIMAP_CONDSTORE_TYPE_RESP_TEXT_CODE) { |
| 1097 | continue; |
| 1098 | } |
| 1099 | |
| 1100 | resptextcode = (struct mailimap_condstore_resptextcode *) ext_data->ext_data; |
| 1101 | switch (resptextcode->cs_type) { |
| 1102 | case MAILIMAP_CONDSTORE_RESPTEXTCODE_HIGHESTMODSEQ: |
| 1103 | mod_sequence_value = resptextcode->cs_data.cs_modseq_value; |
| 1104 | break; |
| 1105 | case MAILIMAP_CONDSTORE_RESPTEXTCODE_NOMODSEQ: |
| 1106 | mod_sequence_value = 0; |
| 1107 | break; |
| 1108 | } |
| 1109 | } |
| 1110 | |
| 1111 | return mod_sequence_value; |
| 1112 | } |
| 1113 | |
| 1114 | String * IMAPSession::customCommand(String * command, ErrorCode * pError) |
| 1115 | { |