OCFrameworkConstants.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 Thumbnails
  43. //api/v1/thumbnail/{x}/{y}/{file}
  44. #define k_url_thumbnails @"index.php/apps/files/api/v1/thumbnail"
  45. //Url to access to Remote Notification API
  46. #define k_url_acces_remote_notification_api @"ocs/v2.php/apps/notifications/api/v2/notifications"
  47. //Url to access to Remote Subscribing Nextcloud server API
  48. #define k_url_acces_remote_subscribing_nextcloud_server_api @"/ocs/v2.php/apps/notifications/api/v2/push"
  49. //Url to access to Remote Activity API
  50. #define k_url_acces_remote_activity_api @"ocs/v2.php/cloud/activity"
  51. //Url to access to External sites API
  52. #define k_url_acces_external_sites_api @"ocs/v2.php/apps/external/api/v1"
  53. //Url to access to User Profile API
  54. #define k_url_acces_remote_userprofile_api @"ocs/v2.php/cloud/user"
  55. //Url to access to End To End Encryption API
  56. #define k_url_client_side_encryption @"ocs/v2.php/apps/end_to_end_encryption/api/v1"
  57. //Version of the server that have share API
  58. #define k_version_support_shared [NSArray arrayWithObjects: @"5", @"0", @"27", nil]
  59. //Version of the server that have sharee API
  60. #define k_version_support_sharee_api [NSArray arrayWithObjects: @"8", @"2", @"0", nil]
  61. //Version of the server that supports cookies
  62. #define k_version_support_cookies [NSArray arrayWithObjects: @"7", @"0", @"0", nil]
  63. //Version of the server that supports forbidden characters
  64. #define k_version_support_forbidden_characters [NSArray arrayWithObjects: @"8", @"1", @"0", nil]
  65. //Version of the server that supports Capabilities
  66. #define k_version_support_capabilities [NSArray arrayWithObjects: @"8", @"2", @"0", nil]
  67. //Version of the server that supports enable/disabled share privilege option for federated shares
  68. #define k_version_support_share_option_fed_share [NSArray arrayWithObjects: @"9", @"1", @"0", nil]
  69. //Name of the session using for upload files with NSURLSession
  70. #define k_session_name @"com.owncloud.upload.session"
  71. //Name of the download session using for download files with NSURLSession
  72. #define k_download_session_name @"com.owncloud.download.session"
  73. //Name of the download session using for download files with NSURLSession in ownCloudExtApp
  74. #define k_download_session_name_ext_app @"com.owncloud.download.session.extApp.extension"
  75. //Name of the download session using for download files with NSURLSession
  76. #define k_download_folder_session_name @"com.owncloud.download.folder.session"
  77. //Name of the download session using for download files with NSURLSession
  78. #define k_network_operation_session_name @"com.owncloud.network.operation.session"
  79. //Name of the container to configure NSURLSessions
  80. #define k_shared_container_identifier @"group.com.owncloud.iOSmobileapp";