MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / msg_att_handler

Function msg_att_handler

src/core/imap/MCIMAPSession.cpp:2168–2399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2166};
2167
2168static void msg_att_handler(struct mailimap_msg_att * msg_att, void * context)
2169{
2170 clistiter * item_iter;
2171 uint32_t uid;
2172 IMAPMessage * msg;
2173 bool hasHeader;
2174 bool hasBody;
2175 bool hasFlags;
2176 bool hasGmailLabels;
2177 bool hasGmailMessageID;
2178 bool hasGmailThreadID;
2179 struct msg_att_handler_data * msg_att_context;
2180 bool fetchByUID;
2181 Array * result;
2182 IMAPMessagesRequestKind requestKind;
2183 uint32_t mLastFetchedSequenceNumber;
2184 HashMap * mapping;
2185 bool needsHeader;
2186 bool needsBody;
2187 bool needsFlags;
2188 bool needsGmailLabels;
2189 bool needsGmailMessageID;
2190 bool needsGmailThreadID;
2191 IndexSet * uidsFilter;
2192 IndexSet * numbersFilter;
2193
2194 msg_att_context = (struct msg_att_handler_data *) context;
2195 uidsFilter = msg_att_context->uidsFilter;
2196 numbersFilter = msg_att_context->numbersFilter;
2197 fetchByUID = msg_att_context->fetchByUID;
2198 result = msg_att_context->result;
2199 requestKind = msg_att_context->requestKind;
2200 mapping = msg_att_context->mapping;
2201 needsHeader = msg_att_context->needsHeader;
2202 needsBody = msg_att_context->needsBody;
2203 needsFlags = msg_att_context->needsFlags;
2204 needsGmailLabels = msg_att_context->needsGmailLabels;
2205 needsGmailMessageID = msg_att_context->needsGmailMessageID;
2206 needsGmailThreadID = msg_att_context->needsGmailThreadID;
2207
2208 hasHeader = false;
2209 hasBody = false;
2210 hasFlags = false;
2211 hasGmailLabels = false;
2212 hasGmailMessageID = false;
2213 hasGmailThreadID = false;
2214
2215 if (numbersFilter != NULL) {
2216 if (!numbersFilter->containsIndex((uint64_t) msg_att->att_number)) {
2217 return;
2218 }
2219 }
2220
2221 msg = new IMAPMessage();
2222
2223 uid = 0;
2224 mLastFetchedSequenceNumber = msg_att->att_number;
2225 if (mapping != NULL) {

Callers

nothing calls this directly

Calls 15

objectForKeyMethod · 0.80
importIMAPEnvelopeMethod · 0.80
importIMAPReferencesMethod · 0.80
releaseMethod · 0.80
containsIndexMethod · 0.45
longLongValueMethod · 0.45
setSequenceNumberMethod · 0.45
setFlagsMethod · 0.45
setOriginalFlagsMethod · 0.45

Tested by

no test coverage detected