Lines Matching refs:Instance
38 @param[in] Buffer - Buffer pointing to the next variable instance
50 @param[out] SizeUsed - Total size used for this variable instance in Buffer
122 @param[in] CallbackFunction - Function called for each variable instance
260 EFI_HANDLE Instance;
262 Instance = (EFI_HANDLE) Context;
265 Instance,
313 IN SV_INSTANCE *Instance,
320 NewSize = Instance->DataSize + Size;
321 if (NewSize <= Instance->BufferSize) {
335 if (Instance->BufferPtr != NULL) {
336 CopyMem (NewBuffer, Instance->BufferPtr, Instance->DataSize);
337 FreePool (Instance->BufferPtr);
340 Instance->BufferPtr = NewBuffer;
341 Instance->BufferSize = NewSize;
350 IN SV_INSTANCE *Instance,
357 ASSERT (Instance != NULL);
360 NewSize = Instance->DataSize + Size;
361 ASSERT ((Instance->DataSize + Size) <= Instance->BufferSize);
364 (VOID*) (((UINT8*) (Instance->BufferPtr)) + Instance->DataSize),
369 Instance->DataSize = NewSize;
374 Creates a new variable serialization instance
376 @param[out] Handle - Handle for a variable serialization instance
378 @retval RETURN_SUCCESS - The variable serialization instance was
381 create the variable serialization instance.
405 Free memory associated with a variable serialization instance
407 @param[in] Handle - Handle for a variable serialization instance
409 @retval RETURN_SUCCESS - The variable serialization instance was
412 variable serialization instance.
421 SV_INSTANCE *Instance;
423 Instance = SV_FROM_HANDLE (Handle);
425 if (Instance->Signature != SV_SIGNATURE) {
429 Instance->Signature = 0;
431 if (Instance->BufferPtr != NULL) {
432 FreePool (Instance->BufferPtr);
435 FreePool (Instance);
442 Creates a new variable serialization instance using the given
443 binary representation of the variables to fill the new instance
445 @param[out] Handle - Handle for a variable serialization instance
453 imported into a new variable serialization instance
455 create the new variable serialization instance
502 @param[in] CallbackFunction - Function called for each variable instance
658 Iterates all variables found in the variable serialization instance
660 @param[in] Handle - Handle for a variable serialization instance
661 @param[in] CallbackFunction - Function called for each variable instance
680 SV_INSTANCE *Instance;
682 Instance = SV_FROM_HANDLE (Handle);
684 if ((Instance->BufferPtr != NULL) && (Instance->DataSize != 0)) {
688 Instance->BufferPtr,
689 Instance->DataSize
698 Sets all variables found in the variable serialization instance
700 @param[in] Handle - Handle for a variable serialization instance
724 Adds a variable to the variable serialization instance
726 @param[in] Handle - Handle for a variable serialization instance
737 variable serialization instance or
753 SV_INSTANCE *Instance;
758 Instance = SV_FROM_HANDLE (Handle);
760 if ((Instance->Signature != SV_SIGNATURE) ||
775 Instance,
785 AppendToBuffer (Instance, (VOID*) &SerializedNameSize, sizeof (SerializedNameSize));
790 AppendToBuffer (Instance, (VOID*) VariableName, SerializedNameSize);
795 AppendToBuffer (Instance, (VOID*) VendorGuid, sizeof (*VendorGuid));
800 AppendToBuffer (Instance, (VOID*) &Attributes, sizeof (Attributes));
806 AppendToBuffer (Instance, (VOID*) &SerializedDataSize, sizeof (SerializedDataSize));
811 AppendToBuffer (Instance, Data, DataSize);
818 Serializes the variables known to this instance into the
821 @param[in] Handle - Handle for a variable serialization instance
833 variable serialization instance or
848 SV_INSTANCE *Instance;
850 Instance = SV_FROM_HANDLE (Handle);
856 if (*Size < Instance->DataSize) {
857 *Size = Instance->DataSize;
865 *Size = Instance->DataSize;
866 CopyMem (Buffer, Instance->BufferPtr, Instance->DataSize);