Lines Matching refs:p_rec
81 UINT8 *p_rec = p_msg; in NDEF_MsgValidate() local
99 for (count = 0; p_rec < p_end; count++) in NDEF_MsgValidate()
102 if (p_rec + 3 > p_end) in NDEF_MsgValidate()
105 rec_hdr = *p_rec++; in NDEF_MsgValidate()
112 type_len = *p_rec++; in NDEF_MsgValidate()
116 payload_len = *p_rec++; in NDEF_MsgValidate()
120 if (p_rec + 4 > p_end) in NDEF_MsgValidate()
123 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_MsgValidate()
130 if (p_rec + 1 > p_end) in NDEF_MsgValidate()
133 id_len = *p_rec++; in NDEF_MsgValidate()
191 p_rec += (payload_len + type_len + id_len); in NDEF_MsgValidate()
204 if (p_rec != p_end) in NDEF_MsgValidate()
222 UINT8 *p_rec = p_msg; in NDEF_MsgGetNumRecs() local
231 rec_hdr = *p_rec++; in NDEF_MsgGetNumRecs()
237 type_len = *p_rec++; in NDEF_MsgGetNumRecs()
241 payload_len = *p_rec++; in NDEF_MsgGetNumRecs()
243 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_MsgGetNumRecs()
247 id_len = *p_rec++; in NDEF_MsgGetNumRecs()
252 p_rec += (payload_len + type_len + id_len); in NDEF_MsgGetNumRecs()
366 UINT8 *p_rec = p_msg; in NDEF_MsgGetRecByIndex() local
374 return (p_rec); in NDEF_MsgGetRecByIndex()
376 rec_hdr = *p_rec++; in NDEF_MsgGetRecByIndex()
382 type_len = *p_rec++; in NDEF_MsgGetRecByIndex()
386 payload_len = *p_rec++; in NDEF_MsgGetRecByIndex()
388 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_MsgGetRecByIndex()
392 id_len = *p_rec++; in NDEF_MsgGetRecByIndex()
397 p_rec += (payload_len + type_len + id_len); in NDEF_MsgGetRecByIndex()
417 UINT8 *p_rec = p_msg; in NDEF_MsgGetLastRecInMsg() local
424 pRecStart = p_rec; in NDEF_MsgGetLastRecInMsg()
425 rec_hdr = *p_rec++; in NDEF_MsgGetLastRecInMsg()
431 type_len = *p_rec++; in NDEF_MsgGetLastRecInMsg()
435 payload_len = *p_rec++; in NDEF_MsgGetLastRecInMsg()
437 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_MsgGetLastRecInMsg()
441 id_len = *p_rec++; in NDEF_MsgGetLastRecInMsg()
446 p_rec += (payload_len + type_len + id_len); in NDEF_MsgGetLastRecInMsg()
465 UINT8 *p_rec = p_msg; in NDEF_MsgGetFirstRecByType() local
472 pRecStart = p_rec; in NDEF_MsgGetFirstRecByType()
474 rec_hdr = *p_rec++; in NDEF_MsgGetFirstRecByType()
477 type_len = *p_rec++; in NDEF_MsgGetFirstRecByType()
481 payload_len = *p_rec++; in NDEF_MsgGetFirstRecByType()
483 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_MsgGetFirstRecByType()
487 id_len = *p_rec++; in NDEF_MsgGetFirstRecByType()
495 && (!memcmp (p_rec, p_type, tlen)) ) in NDEF_MsgGetFirstRecByType()
503 p_rec += (payload_len + type_len + id_len); in NDEF_MsgGetFirstRecByType()
522 UINT8 *p_rec; in NDEF_MsgGetNextRecByType() local
528 if ((p_rec = NDEF_MsgGetNextRec (p_cur_rec)) == NULL) in NDEF_MsgGetNextRecByType()
533 pRecStart = p_rec; in NDEF_MsgGetNextRecByType()
535 rec_hdr = *p_rec++; in NDEF_MsgGetNextRecByType()
538 type_len = *p_rec++; in NDEF_MsgGetNextRecByType()
542 payload_len = *p_rec++; in NDEF_MsgGetNextRecByType()
544 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_MsgGetNextRecByType()
548 id_len = *p_rec++; in NDEF_MsgGetNextRecByType()
556 && (!memcmp (p_rec, p_type, tlen)) ) in NDEF_MsgGetNextRecByType()
564 p_rec += (payload_len + type_len + id_len); in NDEF_MsgGetNextRecByType()
584 UINT8 *p_rec = p_msg; in NDEF_MsgGetFirstRecById() local
591 pRecStart = p_rec; in NDEF_MsgGetFirstRecById()
593 rec_hdr = *p_rec++; in NDEF_MsgGetFirstRecById()
596 type_len = *p_rec++; in NDEF_MsgGetFirstRecById()
600 payload_len = *p_rec++; in NDEF_MsgGetFirstRecById()
602 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_MsgGetFirstRecById()
606 id_len = *p_rec++; in NDEF_MsgGetFirstRecById()
611 p_rec += type_len; in NDEF_MsgGetFirstRecById()
614 if ( (id_len == ilen) && (!memcmp (p_rec, p_id, ilen)) ) in NDEF_MsgGetFirstRecById()
622 p_rec += (id_len + payload_len); in NDEF_MsgGetFirstRecById()
641 UINT8 *p_rec; in NDEF_MsgGetNextRecById() local
647 if ((p_rec = NDEF_MsgGetNextRec (p_cur_rec)) == NULL) in NDEF_MsgGetNextRecById()
652 pRecStart = p_rec; in NDEF_MsgGetNextRecById()
654 rec_hdr = *p_rec++; in NDEF_MsgGetNextRecById()
657 type_len = *p_rec++; in NDEF_MsgGetNextRecById()
661 payload_len = *p_rec++; in NDEF_MsgGetNextRecById()
663 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_MsgGetNextRecById()
667 id_len = *p_rec++; in NDEF_MsgGetNextRecById()
672 p_rec += type_len; in NDEF_MsgGetNextRecById()
675 if ( (id_len == ilen) && (!memcmp (p_rec, p_id, ilen)) ) in NDEF_MsgGetNextRecById()
683 p_rec += (id_len + payload_len); in NDEF_MsgGetNextRecById()
699 UINT8 *NDEF_RecGetType (UINT8 *p_rec, UINT8 *p_tnf, UINT8 *p_type_len) in NDEF_RecGetType() argument
704 rec_hdr = *p_rec++; in NDEF_RecGetType()
707 type_len = *p_rec++; in NDEF_RecGetType()
711 p_rec += 1; in NDEF_RecGetType()
713 p_rec += 4; in NDEF_RecGetType()
717 p_rec++; in NDEF_RecGetType()
726 return (p_rec); in NDEF_RecGetType()
738 UINT8 *NDEF_RecGetId (UINT8 *p_rec, UINT8 *p_id_len) in NDEF_RecGetId() argument
743 rec_hdr = *p_rec++; in NDEF_RecGetId()
746 type_len = *p_rec++; in NDEF_RecGetId()
750 p_rec++; in NDEF_RecGetId()
752 p_rec += 4; in NDEF_RecGetId()
756 *p_id_len = *p_rec++; in NDEF_RecGetId()
764 return (p_rec + type_len); in NDEF_RecGetId()
777 UINT8 *NDEF_RecGetPayload (UINT8 *p_rec, UINT32 *p_payload_len) in NDEF_RecGetPayload() argument
783 rec_hdr = *p_rec++; in NDEF_RecGetPayload()
786 type_len = *p_rec++; in NDEF_RecGetPayload()
790 payload_len = *p_rec++; in NDEF_RecGetPayload()
792 BE_STREAM_TO_UINT32 (payload_len, p_rec); in NDEF_RecGetPayload()
798 id_len = *p_rec++; in NDEF_RecGetPayload()
806 return (p_rec + type_len + id_len); in NDEF_RecGetPayload()
841 UINT8 *p_rec = p_msg + *p_cur_size; in NDEF_MsgAddRec() local
860 *p_rec = tnf | NDEF_MB_MASK | NDEF_ME_MASK; in NDEF_MsgAddRec()
870 *p_rec = tnf | NDEF_ME_MASK; in NDEF_MsgAddRec()
874 *p_rec |= NDEF_SR_MASK; in NDEF_MsgAddRec()
877 *p_rec |= NDEF_IL_MASK; in NDEF_MsgAddRec()
879 p_rec++; in NDEF_MsgAddRec()
882 *p_rec++ = type_len; in NDEF_MsgAddRec()
886 *p_rec++ = (UINT8)payload_len; in NDEF_MsgAddRec()
888 UINT32_TO_BE_STREAM (p_rec, payload_len); in NDEF_MsgAddRec()
892 *p_rec++ = id_len; in NDEF_MsgAddRec()
898 memcpy (p_rec, p_type, type_len); in NDEF_MsgAddRec()
900 p_rec += type_len; in NDEF_MsgAddRec()
907 memcpy (p_rec, p_id, id_len); in NDEF_MsgAddRec()
909 p_rec += id_len; in NDEF_MsgAddRec()
914 memcpy (p_rec, p_payload, payload_len); in NDEF_MsgAddRec()
937 UINT8 *p_rec; in NDEF_MsgInsertRec() local
950 || ((p_rec = NDEF_MsgGetRecByIndex(p_msg, index)) == NULL) ) in NDEF_MsgInsertRec()
961 shiftdown (p_rec, (UINT32)(*p_cur_size - (p_rec - p_msg)), recSize); in NDEF_MsgInsertRec()
965 *p_rec = tnf | NDEF_MB_MASK; in NDEF_MsgInsertRec()
967 *p_rec = tnf; in NDEF_MsgInsertRec()
970 *p_rec |= NDEF_SR_MASK; in NDEF_MsgInsertRec()
973 *p_rec |= NDEF_IL_MASK; in NDEF_MsgInsertRec()
975 p_rec++; in NDEF_MsgInsertRec()
978 *p_rec++ = type_len; in NDEF_MsgInsertRec()
982 *p_rec++ = (UINT8)payload_len; in NDEF_MsgInsertRec()
984 UINT32_TO_BE_STREAM (p_rec, payload_len); in NDEF_MsgInsertRec()
988 *p_rec++ = id_len; in NDEF_MsgInsertRec()
994 memcpy (p_rec, p_type, type_len); in NDEF_MsgInsertRec()
996 p_rec += type_len; in NDEF_MsgInsertRec()
1003 memcpy (p_rec, p_id, id_len); in NDEF_MsgInsertRec()
1005 p_rec += id_len; in NDEF_MsgInsertRec()
1010 memcpy (p_rec, p_payload, payload_len); in NDEF_MsgInsertRec()
1030 UINT8 *p_rec; in NDEF_MsgAppendRec() local
1043 p_rec = p_msg; in NDEF_MsgAppendRec()
1053 p_rec = p_msg + *p_cur_size; in NDEF_MsgAppendRec()
1060 memcpy (p_rec, p_new_rec, new_rec_len); in NDEF_MsgAppendRec()
1079 UINT8 *p_rec, UINT8 *p_add_pl, UINT32 add_pl_len) in NDEF_MsgAppendPayload() argument
1087 pp = p_rec + 1; in NDEF_MsgAppendPayload()
1093 if (*p_rec & NDEF_SR_MASK) in NDEF_MsgAppendPayload()
1099 if (*p_rec & NDEF_IL_MASK) in NDEF_MsgAppendPayload()
1118 pp = p_rec + 2; in NDEF_MsgAppendPayload()
1130 *p_rec &= ~NDEF_SR_MASK; in NDEF_MsgAppendPayload()
1140 if ((*p_rec & NDEF_ME_MASK) == 0) in NDEF_MsgAppendPayload()
1163 UINT8 *p_rec, UINT8 *p_new_pl, UINT32 new_pl_len) in NDEF_MsgReplacePayload() argument
1171 pp = p_rec + 1; in NDEF_MsgReplacePayload()
1177 if (*p_rec & NDEF_SR_MASK) in NDEF_MsgReplacePayload()
1183 if (*p_rec & NDEF_IL_MASK) in NDEF_MsgReplacePayload()
1191 pp = p_rec + 2; in NDEF_MsgReplacePayload()
1208 *p_rec &= ~NDEF_SR_MASK; in NDEF_MsgReplacePayload()
1225 if ((*p_rec & NDEF_ME_MASK) == 0) in NDEF_MsgReplacePayload()
1242 *p_rec |= NDEF_SR_MASK; in NDEF_MsgReplacePayload()
1257 if ((*p_rec & NDEF_ME_MASK) == 0) in NDEF_MsgReplacePayload()
1282 UINT8 *p_rec, UINT8 *p_new_type, UINT8 new_type_len) in NDEF_MsgReplaceType() argument
1289 pp = p_rec + 1; in NDEF_MsgReplaceType()
1295 if (*p_rec & NDEF_SR_MASK) in NDEF_MsgReplaceType()
1300 if (*p_rec & NDEF_IL_MASK) in NDEF_MsgReplaceType()
1333 p_rec[1] = new_type_len; in NDEF_MsgReplaceType()
1354 UINT8 *p_rec, UINT8 *p_new_id, UINT8 new_id_len) in NDEF_MsgReplaceId() argument
1362 pp = p_rec + 1; in NDEF_MsgReplaceId()
1368 if (*p_rec & NDEF_SR_MASK) in NDEF_MsgReplaceId()
1375 if (*p_rec & NDEF_IL_MASK) in NDEF_MsgReplaceId()
1397 *p_rec |= NDEF_IL_MASK; in NDEF_MsgReplaceId()
1423 *p_rec &= ~NDEF_IL_MASK; in NDEF_MsgReplaceId()
1453 UINT8 *p_rec = NDEF_MsgGetRecByIndex (p_msg, index); in NDEF_MsgRemoveRec() local
1456 if (!p_rec) in NDEF_MsgRemoveRec()
1460 if (*p_rec & NDEF_MB_MASK) in NDEF_MsgRemoveRec()
1478 if (*p_rec & NDEF_ME_MASK) in NDEF_MsgRemoveRec()
1488 *p_cur_size = (UINT32)(p_rec - p_msg); in NDEF_MsgRemoveRec()
1494 if ((pNext = NDEF_MsgGetNextRec (p_rec)) == NULL) in NDEF_MsgRemoveRec()
1498 shiftup (p_rec, pNext, (UINT32)(*p_cur_size - (pNext - p_msg))); in NDEF_MsgRemoveRec()
1500 *p_cur_size -= (UINT32)(pNext - p_rec); in NDEF_MsgRemoveRec()
1521 UINT8 *p_rec; in NDEF_MsgCopyAndDechunk() local
1538 p_rec = p_src; in NDEF_MsgCopyAndDechunk()
1541 while ((p_rec != NULL) && (status == NDEF_OK)) in NDEF_MsgCopyAndDechunk()
1543 p_type = NDEF_RecGetType (p_rec, &tnf, &type_len); in NDEF_MsgCopyAndDechunk()
1544 p_id = NDEF_RecGetId (p_rec, &id_len); in NDEF_MsgCopyAndDechunk()
1545 p_pay = NDEF_RecGetPayload (p_rec, &pay_len); in NDEF_MsgCopyAndDechunk()
1563 p_rec = NDEF_MsgGetNextRec (p_rec); in NDEF_MsgCopyAndDechunk()