ABTConstants.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright 2019 Google
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #define ABT_MSEC_PER_SEC 1000ull
  15. #pragma mark - Keys for experiment dictionaries.
  16. static NSString *const kABTExperimentDictionaryCreationTimestampKey = @"creationTimestamp";
  17. static NSString *const kABTExperimentDictionaryExperimentIDKey = @"name";
  18. static NSString *const kABTExperimentDictionaryExpiredEventKey = @"expiredEvent";
  19. static NSString *const kABTExperimentDictionaryOriginKey = @"origin";
  20. static NSString *const kABTExperimentDictionaryTimedOutEventKey = @"timedOutEvent";
  21. static NSString *const kABTExperimentDictionaryTimeToLiveKey = @"timeToLive";
  22. static NSString *const kABTExperimentDictionaryTriggeredEventKey = @"triggeredEvent";
  23. static NSString *const kABTExperimentDictionaryTriggeredEventNameKey = @"triggerEventName";
  24. static NSString *const kABTExperimentDictionaryTriggerTimeoutKey = @"triggerTimeout";
  25. static NSString *const kABTExperimentDictionaryVariantIDKey = @"value";
  26. #pragma mark - Keys for event dictionaries.
  27. static NSString *const kABTEventDictionaryNameKey = @"name";
  28. static NSString *const kABTEventDictionaryOriginKey = @"origin";
  29. static NSString *const kABTEventDictionaryParametersKey = @"parameters";
  30. static NSString *const kABTEventDictionaryTimestampKey = @"timestamp";
  31. #pragma mark - Errors
  32. static NSString *const kABTErrorDomain = @"com.google.abtesting";
  33. typedef NS_ENUM(NSUInteger, ABTInternalErrorCode) {
  34. kABTInternalErrorFailedToFetchConditionalUserProperties = 1
  35. };