OCFrameworkConstants.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. //
  2. // OCFrameworkConstants.h
  3. // Owncloud iOs Client
  4. //
  5. // Copyright (C) 2016, ownCloud GmbH. ( http://www.owncloud.org/ )
  6. //
  7. // Permission is hereby granted, free of charge, to any person obtaining a copy
  8. // of this software and associated documentation files (the "Software"), to deal
  9. // in the Software without restriction, including without limitation the rights
  10. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. // copies of the Software, and to permit persons to whom the Software is
  12. // furnished to do so, subject to the following conditions:
  13. // The above copyright notice and this permission notice shall be included in
  14. // all copies or substantial portions of the Software.
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. // THE SOFTWARE.
  22. //
  23. //Timeout to weddav requests
  24. #define k_timeout_webdav 30 //seconds
  25. //Timeout to upload
  26. #define k_timeout_upload 40 //seconds
  27. //Timeout for fast requests
  28. #define k_timeout_fast 5 //seconds
  29. //Timeout to search
  30. #define k_timeout_search 60 //seconds
  31. //Chunk length
  32. #define k_OC_lenght_chunk 1048576
  33. #define k_domain_error_code @"com.owncloud"
  34. //Url to access to Shared API to create
  35. #define k_url_acces_shared_api @"ocs/v1.php/apps/files_sharing/api/v1/shares"
  36. //Url to access to Remote Shared API
  37. #define k_url_acces_remote_shared_api @"ocs/v1.php/apps/files_sharing/api/v1/remote_shares"
  38. //Url to access to Sharee API
  39. #define k_url_access_sharee_api @"ocs/v2.php/apps/files_sharing/api/v1/sharees"
  40. //Url to access to Capabilities API
  41. #define k_url_capabilities @"ocs/v1.php/cloud/capabilities"
  42. //Url to access to Remote Notification API
  43. #define k_url_acces_remote_notification_api @"ocs/v2.php/apps/notifications/api/v2/notifications"
  44. //Url to access to Remote Subscribing Nextcloud server API
  45. #define k_url_acces_remote_subscribing_nextcloud_server_api @"/ocs/v2.php/apps/notifications/api/v2/push"
  46. //Url to access to Remote Activity API
  47. #define k_url_acces_remote_activity_api @"ocs/v2.php/cloud/activity"
  48. //Url to access to External sites API
  49. #define k_url_acces_external_sites_api @"ocs/v2.php/apps/external/api/v1"
  50. //Url to access to User Profile API
  51. #define k_url_acces_remote_userprofile_api @"ocs/v2.php/cloud/user"
  52. //Url to access to End To End Encryption API
  53. #define k_url_client_side_encryption @"ocs/v2.php/apps/end_to_end_encryption/api/v1"
  54. //Url to access to document Mobile Editor OCS API
  55. #define k_url_create_link_mobile_editor @"ocs/v2.php/apps/richdocuments/api/v1/document"
  56. //Url to access to templates Mobile Editor OCS API
  57. #define k_url_create_template_mobile_editor @"ocs/v2.php/apps/richdocuments/api/v1/templates/"
  58. //Url to insert files directly from your Nextcloud to a Collabora Online document
  59. #define k_url_insert_assets_to_collabora @"apps/richdocuments/assets"
  60. //Version of the server that have share API
  61. #define k_version_support_shared [NSArray arrayWithObjects: @"5", @"0", @"27", nil]
  62. //Version of the server that have sharee API
  63. #define k_version_support_sharee_api [NSArray arrayWithObjects: @"8", @"2", @"0", nil]
  64. //Version of the server that supports cookies
  65. #define k_version_support_cookies [NSArray arrayWithObjects: @"7", @"0", @"0", nil]
  66. //Version of the server that supports forbidden characters
  67. #define k_version_support_forbidden_characters [NSArray arrayWithObjects: @"8", @"1", @"0", nil]
  68. //Version of the server that supports Capabilities
  69. #define k_version_support_capabilities [NSArray arrayWithObjects: @"8", @"2", @"0", nil]
  70. //Version of the server that supports enable/disabled share privilege option for federated shares
  71. #define k_version_support_share_option_fed_share [NSArray arrayWithObjects: @"9", @"1", @"0", nil]
  72. //Name of the session using for upload files with NSURLSession
  73. #define k_session_name @"com.owncloud.upload.session"
  74. //Name of the download session using for download files with NSURLSession
  75. #define k_download_session_name @"com.owncloud.download.session"
  76. //Name of the download session using for download files with NSURLSession in ownCloudExtApp
  77. #define k_download_session_name_ext_app @"com.owncloud.download.session.extApp.extension"
  78. //Name of the download session using for download files with NSURLSession
  79. #define k_download_folder_session_name @"com.owncloud.download.folder.session"
  80. //Name of the download session using for download files with NSURLSession
  81. #define k_network_operation_session_name @"com.owncloud.network.operation.session"
  82. //Name of the container to configure NSURLSessions
  83. #define k_shared_container_identifier @"group.com.owncloud.iOSmobileapp";
  84. // Quota return value
  85. #define k_quota_space_not_computed -1
  86. #define k_quota_space_unknown -2
  87. #define k_quota_space_unlimited -3