GULNetworkConstants.m 1.9 KB

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