Home | History | Annotate | Download | only in parser

Lines Matching refs:pStart

69     const uint8_t *pStart = NULL, *pEnd = NULL;
83 pStart = drm_strnstr(buffer, (uint8_t *)"--", bufferLen);
84 if (NULL == pStart)
86 pEnd = pStart;
89 pEnd = drm_strnstr(pStart, (uint8_t *)DRM_NEW_LINE_CRLF, leftLen);
93 if ((pEnd - pStart) >= MAX_CONTENT_BOUNDARY_LEN)
95 strncpy((char *)pDmInfo->boundary, (char *)pStart, pEnd - pStart);
100 pStart = pEnd;
101 leftLen = pBufferEnd - pStart;
107 while ((('\r' != *pStart) || ('\n' != *(pStart + 1))) && pStart < pBufferEnd) {
108 pEnd = drm_strnstr(pStart, (uint8_t *)DRM_NEW_LINE_CRLF, leftLen);
113 if (0 == strncmp((char *)pStart, HEADERS_TRANSFER_CODING, HEADERS_TRANSFER_CODING_LEN)) {
114 pStart += HEADERS_TRANSFER_CODING_LEN;
115 DRM_SKIP_SPACE_TAB(pStart);
117 if (0 == strncmp((char *)pStart, TRANSFER_CODING_TYPE_7BIT, pEnd - pStart))
119 else if (0 == strncmp((char *)pStart, TRANSFER_CODING_TYPE_8BIT, pEnd - pStart))
121 else if (0 == strncmp((char *)pStart, TRANSFER_CODING_TYPE_BINARY, pEnd - pStart))
123 else if (0 == strncmp((char *)pStart, TRANSFER_CODING_TYPE_BASE64, pEnd - pStart))
127 } else if (0 == drm_strnicmp(pStart, (uint8_t *)HEADERS_CONTENT_TYPE, HEADERS_CONTENT_TYPE_LEN)) {
128 pStart += HEADERS_CONTENT_TYPE_LEN;
129 DRM_SKIP_SPACE_TAB(pStart);
131 if (pEnd - pStart > 0) {
132 if ((pEnd - pStart) >= MAX_CONTENT_TYPE_LEN)
134 strncpy((char *)pDmInfo->contentType, (char *)pStart, pEnd - pStart);
135 pDmInfo->contentType[pEnd - pStart] = '\0';
137 } else if (0 == drm_strnicmp(pStart, (uint8_t *)HEADERS_CONTENT_ID, HEADERS_CONTENT_ID_LEN)) {
141 pStart += HEADERS_CONTENT_ID_LEN;
142 DRM_SKIP_SPACE_TAB(pStart);
145 if(drm_strnstr(pStart, (uint8_t*)HEADERS_CONTENT_ID, pBufferEnd - pStart)){
153 if (NULL != (pTmp = (uint8_t *)memchr((char *)pStart, '<', pEnd - pStart))) {
168 if (0 == drm_strnicmp(pStart, (uint8_t *)HEADERS_CONTENT_TYPE, HEADERS_CONTENT_TYPE_LEN)) {
169 pStart += HEADERS_CONTENT_TYPE_LEN;
170 DRM_SKIP_SPACE_TAB(pStart);
172 if (pEnd - pStart > 0) {
173 strncpy((char *)pDmInfo->contentType, (char *)pStart, pEnd - pStart);
174 pDmInfo->contentType[pEnd - pStart] = '\0';
192 pStart = pEnd;
193 leftLen = pBufferEnd - pStart;
195 pStart += 2; /* skip the second CRLF: "\r\n" */
196 pEnd = pStart;
221 contentLen = pEnd - pStart;
226 pDmInfo->contentOffset = pStart - buffer;
232 pDmInfo->rightsOffset = pStart - buffer;
235 pDmInfo->contentOffset = pStart - buffer;
246 contentLen = pEnd - pStart;
247 if (FALSE == drm_dcfParser(pStart, contentLen, &dcfInfo, &pEncData))
265 pStart = drm_strnstr(pEnd, pDmInfo->boundary, leftLen);
266 if (NULL == pStart)
268 leftLen = pBufferEnd - pStart;
269 pEnd = drm_strnstr(pStart, (uint8_t *)DRM_NEW_LINE_CRLF, leftLen);
274 pStart = pEnd;