OCFrameworkConstants.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. #define k_url_acces_shared_api @"ocs/v2.php/apps/files_sharing/api/v1/shares"
  37. //Url to access to Remote Shared API
  38. #define k_url_acces_remote_shared_api @"ocs/v1.php/apps/files_sharing/api/v1/remote_shares"
  39. //Url to access to Sharee API
  40. #define k_url_access_sharee_api @"ocs/v2.php/apps/files_sharing/api/v1/sharees"
  41. //Url to access to Capabilities API
  42. #define k_url_capabilities @"ocs/v1.php/cloud/capabilities"
  43. //Url to access to Remote Notification API
  44. #define k_url_acces_remote_notification_api @"ocs/v2.php/apps/notifications/api/v2/notifications"
  45. //Url to access to Remote Subscribing Nextcloud server API
  46. #define k_url_acces_remote_subscribing_nextcloud_server_api @"/ocs/v2.php/apps/notifications/api/v2/push"
  47. //Url to access to Remote Activity API
  48. #define k_url_acces_remote_activity_api @"ocs/v2.php/apps/activity/api/v2/activity"
  49. //Url to access to External sites API
  50. #define k_url_acces_external_sites_api @"ocs/v2.php/apps/external/api/v1"
  51. //Url to access to User Profile API
  52. #define k_url_acces_remote_userprofile_api @"ocs/v2.php/cloud/user"
  53. //Url to access to End To End Encryption API
  54. #define k_url_client_side_encryption @"ocs/v2.php/apps/end_to_end_encryption/api/v1"
  55. //Url to access to document Mobile Editor OCS API
  56. #define k_url_create_link_mobile_richdocuments @"ocs/v2.php/apps/richdocuments/api/v1/document"
  57. //Url to access to templates Mobile Editor OCS API
  58. #define k_url_get_template_mobile_richdocuments @"ocs/v2.php/apps/richdocuments/api/v1/templates/"
  59. // Url to create a new richdocuments from a Template
  60. #define k_url_create_new_mobile_richdocuments @"ocs/v2.php/apps/richdocuments/api/v1/templates/new"
  61. //Url to insert files directly from your Nextcloud to a richdocuments
  62. #define k_url_insert_assets_to_richdocuments @"index.php/apps/richdocuments/assets"
  63. //Url for fulltextsearch
  64. #define k_url_fulltextsearch @"index.php/apps/fulltextsearch/v1/remote"
  65. //Url for remote wipe
  66. #define k_url_get_wipe @"index.php/core/wipe"
  67. //Version of the server that have share API
  68. #define k_version_support_shared [NSArray arrayWithObjects: @"5", @"0", @"27", nil]
  69. //Version of the server that have sharee API
  70. #define k_version_support_sharee_api [NSArray arrayWithObjects: @"8", @"2", @"0", nil]
  71. //Version of the server that supports cookies
  72. #define k_version_support_cookies [NSArray arrayWithObjects: @"7", @"0", @"0", nil]
  73. //Version of the server that supports forbidden characters
  74. #define k_version_support_forbidden_characters [NSArray arrayWithObjects: @"8", @"1", @"0", nil]
  75. //Version of the server that supports Capabilities
  76. #define k_version_support_capabilities [NSArray arrayWithObjects: @"8", @"2", @"0", nil]
  77. //Version of the server that supports enable/disabled share privilege option for federated shares
  78. #define k_version_support_share_option_fed_share [NSArray arrayWithObjects: @"9", @"1", @"0", nil]
  79. //Name of the session using for upload files with NSURLSession
  80. #define k_session_name @"com.owncloud.upload.session"
  81. //Name of the download session using for download files with NSURLSession
  82. #define k_download_session_name @"com.owncloud.download.session"
  83. //Name of the download session using for download files with NSURLSession in ownCloudExtApp
  84. #define k_download_session_name_ext_app @"com.owncloud.download.session.extApp.extension"
  85. //Name of the download session using for download files with NSURLSession
  86. #define k_download_folder_session_name @"com.owncloud.download.folder.session"
  87. //Name of the download session using for download files with NSURLSession
  88. #define k_network_operation_session_name @"com.owncloud.network.operation.session"
  89. //Name of the container to configure NSURLSessions
  90. #define k_shared_container_identifier @"group.com.owncloud.iOSmobileapp";
  91. // Quota return value
  92. #define k_quota_space_not_computed -1
  93. #define k_quota_space_unknown -2
  94. #define k_quota_space_unlimited -3