GULNetworkConstants.m 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "GoogleUtilities/Network/Private/GULNetworkConstants.h"
  15. #import <Foundation/Foundation.h>
  16. NSString *const kGULNetworkBackgroundSessionConfigIDPrefix = @"com.gul.network.background-upload";
  17. NSString *const kGULNetworkApplicationSupportSubdirectory = @"GUL/Network";
  18. NSString *const kGULNetworkTempDirectoryName = @"GULNetworkTemporaryDirectory";
  19. const NSTimeInterval kGULNetworkTempFolderExpireTime = 60 * 60; // 1 hour
  20. const NSTimeInterval kGULNetworkTimeOutInterval = 60; // 1 minute.
  21. NSString *const kGULNetworkReachabilityHost = @"app-measurement.com";
  22. NSString *const kGULNetworkErrorContext = @"Context";
  23. const int kGULNetworkHTTPStatusOK = 200;
  24. const int kGULNetworkHTTPStatusNoContent = 204;
  25. const int kGULNetworkHTTPStatusCodeMultipleChoices = 300;
  26. const int kGULNetworkHTTPStatusCodeMovedPermanently = 301;
  27. const int kGULNetworkHTTPStatusCodeFound = 302;
  28. const int kGULNetworkHTTPStatusCodeNotModified = 304;
  29. const int kGULNetworkHTTPStatusCodeMovedTemporarily = 307;
  30. const int kGULNetworkHTTPStatusCodeNotFound = 404;
  31. const int kGULNetworkHTTPStatusCodeCannotAcceptTraffic = 429;
  32. const int kGULNetworkHTTPStatusCodeUnavailable = 503;
  33. NSString *const kGULNetworkErrorDomain = @"com.gul.network.ErrorDomain";
  34. GULLoggerService kGULLoggerNetwork = @"[GULNetwork]";