Lines Matching refs:Question

1180   Get Question's current Value.
1184 @param Question Question to be initialized.
1195 IN OUT FORM_BROWSER_STATEMENT *Question,
1228 if (Question->QuestionId == 0) {
1233 // Question value is provided by an Expression, evaluate it
1235 if (Question->ValueExpression != NULL) {
1236 Status = EvaluateExpression (FormSet, Form, Question->ValueExpression);
1238 if (Question->ValueExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
1239 ASSERT (Question->HiiValue.Type == EFI_IFR_TYPE_BUFFER && Question->HiiValue.Buffer != NULL);
1240 if (Question->StorageWidth > Question->ValueExpression->Result.BufferLen) {
1241 CopyMem (Question->HiiValue.Buffer, Question->ValueExpression->Result.Buffer, Question->ValueExpression->Result.BufferLen);
1242 Question->HiiValue.BufferLen = Question->ValueExpression->Result.BufferLen;
1244 CopyMem (Question->HiiValue.Buffer, Question->ValueExpression->Result.Buffer, Question->StorageWidth);
1245 Question->HiiValue.BufferLen = Question->StorageWidth;
1247 FreePool (Question->ValueExpression->Result.Buffer);
1249 Question->HiiValue.Type = Question->ValueExpression->Result.Type;
1250 CopyMem (&Question->HiiValue.Value, &Question->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
1258 if (Question->ReadExpression != NULL && Form->FormType == STANDARD_MAP_FORM_TYPE) {
1259 Status = EvaluateExpression (FormSet, Form, Question->ReadExpression);
1261 ((Question->ReadExpression->Result.Type < EFI_IFR_TYPE_OTHER) || (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER))) {
1265 if (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
1266 ASSERT (Question->HiiValue.Type == EFI_IFR_TYPE_BUFFER && Question->HiiValue.Buffer != NULL);
1267 if (Question->StorageWidth > Question->ReadExpression->Result.BufferLen) {
1268 CopyMem (Question->HiiValue.Buffer, Question->ReadExpression->Result.Buffer, Question->ReadExpression->Result.BufferLen);
1269 Question->HiiValue.BufferLen = Question->ReadExpression->Result.BufferLen;
1271 CopyMem (Question->HiiValue.Buffer, Question->ReadExpression->Result.Buffer, Question->StorageWidth);
1272 Question->HiiValue.BufferLen = Question->StorageWidth;
1274 FreePool (Question->ReadExpression->Result.Buffer);
1276 Question->HiiValue.Type = Question->ReadExpression->Result.Type;
1277 CopyMem (&Question->HiiValue.Value, &Question->ReadExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
1283 // Question value is provided by RTC
1285 Storage = Question->Storage;
1286 QuestionValue = &Question->HiiValue.Value;
1289 // It's a Question without storage, or RTC date/time
1291 if (Question->Operand == EFI_IFR_DATE_OP || Question->Operand == EFI_IFR_TIME_OP) {
1295 switch (Question->Flags & EFI_QF_DATE_STORAGE) {
1316 if (Question->Operand == EFI_IFR_DATE_OP) {
1331 // Question value is provided by EFI variable
1333 StorageWidth = Question->StorageWidth;
1335 if (Question->BufferValue != NULL) {
1336 Dst = Question->BufferValue;
1342 Question->VariableName,
1355 // Question Value is provided by Buffer Storage or NameValue Storage
1357 if (Question->BufferValue != NULL) {
1359 // This Question is password or orderedlist
1361 Dst = Question->BufferValue;
1366 Dst = (UINT8 *) &Question->HiiValue.Value;
1375 IsString = (BOOLEAN) ((Question->HiiValue.Type == EFI_IFR_TYPE_STRING) ? TRUE : FALSE);
1381 CopyMem (Dst, Storage->EditBuffer + Question->VarStoreInfo.VarOffset, StorageWidth);
1384 Status = GetValueByName (Storage, Question->VariableName, &Value);
1446 Length += StrLen (Question->BlockName);
1449 Length += StrLen (Question->VariableName) + 1;
1456 StrCat (ConfigRequest, Question->BlockName);
1459 StrCat (ConfigRequest, Question->VariableName);
1570 CopyMem (Dst, TemBuffer + Question->VarStoreInfo.VarOffset, StorageWidth);
1579 CopyMem (Storage->EditBuffer + Question->VarStoreInfo.VarOffset, Dst, StorageWidth);
1581 SetValueByName (Storage, Question->VariableName, Value, TRUE);
1594 Save Question Value to edit copy(cached) or Storage(uncached).
1598 @param Question Pointer to the Question.
1609 IN OUT FORM_BROWSER_STATEMENT *Question,
1638 if (Question->QuestionId == 0) {
1643 // If Question value is provided by an Expression, then it is read only
1645 if (Question->ValueExpression != NULL) {
1652 if (Question->WriteExpression != NULL && Form->FormType == STANDARD_MAP_FORM_TYPE) {
1653 Status = EvaluateExpression (FormSet, Form, Question->WriteExpression);
1660 // Question value is provided by RTC
1662 Storage = Question->Storage;
1663 QuestionValue = &Question->HiiValue.Value;
1666 // It's a Question without storage, or RTC date/time
1668 if (Question->Operand == EFI_IFR_DATE_OP || Question->Operand == EFI_IFR_TIME_OP) {
1672 switch (Question->Flags & EFI_QF_DATE_STORAGE) {
1693 if (Question->Operand == EFI_IFR_DATE_OP) {
1703 if ((Question->Flags & EFI_QF_DATE_STORAGE) == QF_DATE_STORAGE_TIME) {
1714 // Question value is provided by EFI variable
1716 StorageWidth = Question->StorageWidth;
1718 if (Question->BufferValue != NULL) {
1719 Src = Question->BufferValue;
1725 Question->VariableName,
1735 // Question Value is provided by Buffer Storage or NameValue Storage
1737 if (Question->BufferValue != NULL) {
1738 Src = Question->BufferValue;
1740 Src = (UINT8 *) &Question->HiiValue.Value;
1749 IsString = (BOOLEAN) ((Question->HiiValue.Type == EFI_IFR_TYPE_STRING) ? TRUE : FALSE);
1754 CopyMem (Storage->EditBuffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
1786 Status = SetValueByName (Storage, Question->VariableName, Value, TRUE);
1797 Length = StrLen (Question->BlockName) + 7;
1799 Length = StrLen (Question->VariableName) + 2;
1811 StrCat (ConfigResp, Question->BlockName);
1815 StrCat (ConfigResp, Question->VariableName);
1851 // Submit Question Value to Configuration Driver
1882 CopyMem (TemBuffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
1899 CopyMem (Storage->Buffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
1911 @param Question The Question to be validated.
1922 IN FORM_BROWSER_STATEMENT *Question,
1934 ListHead = &Question->InconsistentListHead;
1936 ListHead = &Question->NoSubmitListHead;
1993 FORM_BROWSER_STATEMENT *Question;
2008 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
2010 Status = ValidateQuestion (FormSet, Form, Question, EFI_HII_EXPRESSION_NO_SUBMIT_IF);
2506 Get Question default value from AltCfg string.
2509 @param Question The question.
2512 @retval EFI_SUCCESS Question is reset to default value.
2518 IN OUT FORM_BROWSER_STATEMENT *Question,
2546 Storage = Question->Storage;
2555 // Question Value is provided by Buffer Storage or NameValue Storage
2557 if (Question->BufferValue != NULL) {
2559 // This Question is password or orderedlist
2561 Dst = Question->BufferValue;
2566 Dst = (UINT8 *) &Question->HiiValue.Value;
2570 IsString = (BOOLEAN) ((Question->HiiValue.Type == EFI_IFR_TYPE_STRING) ? TRUE : FALSE);
2578 Length += StrLen (Question->BlockName);
2581 Length += StrLen (Question->VariableName) + 1;
2588 StrCat (ConfigRequest, Question->BlockName);
2591 StrCat (ConfigRequest, Question->VariableName);
2636 Value = StrStr (ConfigResp, Question->VariableName);
2639 Value = Value + StrLen (Question->VariableName);
2731 Reset Question to its default value.
2735 @param Question The question.
2738 @retval EFI_SUCCESS Question is reset to default value.
2745 IN FORM_BROWSER_STATEMENT *Question,
2766 if (Question->QuestionId == 0) {
2771 // There are Five ways to specify default value for a Question:
2778 HiiValue = &Question->HiiValue;
2781 // Get Question defaut value from call back function.
2785 if ((Action > 0) && ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) && (ConfigAccess != NULL)) {
2790 Question->QuestionId,
2804 Status = GetDefaultValueFromAltCfg(FormSet, Question, DefaultId);
2813 if (!IsListEmpty (&Question->DefaultListHead)) {
2814 Link = GetFirstNode (&Question->DefaultListHead);
2815 while (!IsNull (&Question->DefaultListHead, Link)) {
2829 ASSERT (HiiValue->Type == EFI_IFR_TYPE_BUFFER && Question->BufferValue != NULL);
2830 if (Question->StorageWidth > Default->ValueExpression->Result.BufferLen) {
2831 CopyMem (Question->HiiValue.Buffer, Default->ValueExpression->Result.Buffer, Default->ValueExpression->Result.BufferLen);
2832 Question->HiiValue.BufferLen = Default->ValueExpression->Result.BufferLen;
2834 CopyMem (Question->HiiValue.Buffer, Default->ValueExpression->Result.Buffer, Question->StorageWidth);
2835 Question->HiiValue.BufferLen = Question->StorageWidth;
2853 if (Question->StorageWidth > StrSize (StrValue)) {
2854 CopyMem (Question->BufferValue, StrValue, StrSize (StrValue));
2856 CopyMem (Question->BufferValue, StrValue, Question->StorageWidth);
2863 Link = GetNextNode (&Question->DefaultListHead, Link);
2870 if ((Question->Operand == EFI_IFR_ONE_OF_OP) && !IsListEmpty (&Question->OptionListHead)) {
2875 Link = GetFirstNode (&Question->OptionListHead);
2876 while (!IsNull (&Question->OptionListHead, Link)) {
2887 Link = GetNextNode (&Question->OptionListHead, Link);
2895 if (Question->Operand == EFI_IFR_CHECKBOX_OP) {
2900 if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT) != 0)) ||
2901 ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) != 0))
2916 switch (Question->Operand) {
2921 if ((HiiValue->Value.u64 < Question->Minimum) || (HiiValue->Value.u64 > Question->Maximum)) {
2922 HiiValue->Value.u64 = Question->Minimum;
2931 if (ValueToOption (Question, HiiValue) == NULL) {
2932 Link = GetFirstNode (&Question->OptionListHead);
2933 if (!IsNull (&Question->OptionListHead, Link)) {
2946 Link = GetFirstNode (&Question->OptionListHead);
2947 while (!IsNull (&Question->OptionListHead, Link)) {
2951 SetArrayData (Question->BufferValue, Question->ValueType, Index, Option->Value.Value.u64);
2954 if (Index >= Question->MaxContainers) {
2958 Link = GetNextNode (&Question->OptionListHead, Link);
2993 FORM_BROWSER_STATEMENT *Question;
3013 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
3017 // If Question is disabled, don't reset it to default
3019 if (Question->Expression != NULL) {
3020 if (EvaluateExpressionList(Question->Expression, TRUE, FormSet, Form) == ExpressDisable) {
3026 // Reset Question to its default value
3028 Status = GetQuestionDefault (FormSet, Form, Question, DefaultId);
3036 if ((Question->Storage != NULL) &&
3037 (Question->Storage->Type != EFI_HII_VARSTORE_EFI_VARIABLE)) {
3038 SetQuestionValue (FormSet, Form, Question, TRUE);
3129 Initialize Question's Edit copy from Storage.
3134 If Selection is NULL, only initialize Question value.
3150 FORM_BROWSER_STATEMENT *Question;
3156 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
3159 // Initialize local copy of Value for each Question
3161 Status = GetQuestionValue (FormSet, Form, Question, TRUE);
3166 if ((Question->Operand == EFI_IFR_STRING_OP) || (Question->Operand == EFI_IFR_PASSWORD_OP)) {
3167 HiiSetString (FormSet->HiiHandle, Question->HiiValue.Value.string, (CHAR16*)Question->BufferValue, NULL);
3173 if ((Question->Operand == EFI_IFR_REF_OP) && (FormSet->ConfigAccess != NULL) && (Selection != NULL)) {
3174 Status = ProcessCallBackFunction(Selection, Question, EFI_BROWSER_ACTION_RETRIEVE, TRUE);
3186 (Question->QuestionId != 0) &&
3187 (Question->Storage != NULL) &&
3188 (Question->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) &&
3189 ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK)) {
3194 StorageWidth = Question->StorageWidth;
3195 if (Question->BufferValue != NULL) {
3196 BufferValue = Question->BufferValue;
3198 BufferValue = (UINT8 *) &Question->HiiValue.Value;
3201 Question->VariableName,
3202 &Question->Storage->Guid,
3209 Status = ProcessCallBackFunction(Selection, Question, EFI_BROWSER_ACTION_RETRIEVE, TRUE);
3220 Initialize Question's Edit copy from Storage for the whole Formset.
3225 If Selection is NULL, only initialize Question value.