FIRNetworkConstants.m 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2017 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. #import "Private/FIRNetworkConstants.h"
  15. #import <Foundation/Foundation.h>
  16. NSString *const kFIRNetworkBackgroundSessionConfigIDPrefix =
  17. @"com.firebase.network.background-upload";
  18. NSString *const kFIRNetworkApplicationSupportSubdirectory = @"Firebase/Network";
  19. NSString *const kFIRNetworkTempDirectoryName = @"FIRNetworkTemporaryDirectory";
  20. const NSTimeInterval kFIRNetworkTempFolderExpireTime = 60 * 60; // 1 hour
  21. const NSTimeInterval kFIRNetworkTimeOutInterval = 60; // 1 minute.
  22. NSString *const kFIRNetworkReachabilityHost = @"app-measurement.com";
  23. NSString *const kFIRNetworkErrorContext = @"Context";
  24. const int kFIRNetworkHTTPStatusOK = 200;
  25. const int kFIRNetworkHTTPStatusNoContent = 204;
  26. const int kFIRNetworkHTTPStatusCodeMultipleChoices = 300;
  27. const int kFIRNetworkHTTPStatusCodeMovedPermanently = 301;
  28. const int kFIRNetworkHTTPStatusCodeFound = 302;
  29. const int kFIRNetworkHTTPStatusCodeNotModified = 304;
  30. const int kFIRNetworkHTTPStatusCodeMovedTemporarily = 307;
  31. const int kFIRNetworkHTTPStatusCodeNotFound = 404;
  32. const int kFIRNetworkHTTPStatusCodeCannotAcceptTraffic = 429;
  33. const int kFIRNetworkHTTPStatusCodeUnavailable = 503;
  34. NSString *const kFIRNetworkErrorDomain = @"com.firebase.network.ErrorDomain";