@@ -128,6 +128,10 @@ enum
128
128
kDeviceOption_WiFi_PAF ,
129
129
#endif
130
130
kDeviceOption_DacProvider ,
131
+ #if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED
132
+ kDeviceOption_TermsAndConditions_Version ,
133
+ kDeviceOption_TermsAndConditions_Required ,
134
+ #endif
131
135
};
132
136
133
137
constexpr unsigned kAppUsageLength = 64 ;
@@ -204,6 +208,10 @@ OptionDef sDeviceOptionDefs[] = {
204
208
{ " faults" , kArgumentRequired , kDeviceOption_FaultInjection },
205
209
#endif
206
210
{ " dac_provider" , kArgumentRequired , kDeviceOption_DacProvider },
211
+ #if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED
212
+ { " tc-version" , kArgumentRequired , kDeviceOption_TermsAndConditions_Version },
213
+ { " tc-required" , kArgumentRequired , kDeviceOption_TermsAndConditions_Required },
214
+ #endif
207
215
{}
208
216
};
209
217
@@ -362,6 +370,15 @@ const char * sDeviceOptionHelp =
362
370
" Specifies the time after which the device transitions from active to idle.\n "
363
371
" \n "
364
372
#endif
373
+ #if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED
374
+ " --tc-version\n "
375
+ " Sets the minimum required version of the Terms and Conditions\n "
376
+ " \n "
377
+ " --tc-required\n "
378
+ " Sets the required acknowledgements for the Terms and Conditions as a 16-bit enumeration.\n "
379
+ " Each bit represents an ordinal corresponding to a specific acknowledgment requirement.\n "
380
+ " \n "
381
+ #endif
365
382
#if CHIP_WITH_NLFAULTINJECTION
366
383
" --faults <fault-string,...>\n "
367
384
" Inject specified fault(s) at runtime.\n "
@@ -747,6 +764,17 @@ bool HandleOption(const char * aProgram, OptionSet * aOptions, int aIdentifier,
747
764
LinuxDeviceOptions::GetInstance ().dacProvider = &testDacProvider;
748
765
break ;
749
766
}
767
+ #if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED
768
+ case kDeviceOption_TermsAndConditions_Version : {
769
+ LinuxDeviceOptions::GetInstance ().tcVersion .SetValue (static_cast <uint16_t >(atoi (aValue)));
770
+ break ;
771
+ }
772
+
773
+ case kDeviceOption_TermsAndConditions_Required : {
774
+ LinuxDeviceOptions::GetInstance ().tcRequired .SetValue (static_cast <uint16_t >(atoi (aValue)));
775
+ break ;
776
+ }
777
+ #endif
750
778
default :
751
779
PrintArgError (" %s: INTERNAL ERROR: Unhandled option: %s\n " , aProgram, aName);
752
780
retval = false ;
0 commit comments