]> source.dussan.org Git - nextcloud-server.git/commitdiff
Copy the regexes to the public interface 436/head
authorJoas Schilling <coding@schilljs.com>
Mon, 18 Jul 2016 13:11:44 +0000 (15:11 +0200)
committerJoas Schilling <coding@schilljs.com>
Mon, 18 Jul 2016 13:11:44 +0000 (15:11 +0200)
lib/private/AppFramework/Http/Request.php
lib/public/IRequest.php

index eca02b2ac2b13444a7039a64aa1d0dd70162d15e..d9cf1919252800ba91dc11d6fe50a282728f1b0e 100644 (file)
@@ -67,10 +67,20 @@ class Request implements \ArrayAccess, \Countable, IRequest {
        // Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
        const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
        const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
+       const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)$/';
+
+       /**
+        * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_IOS instead
+        */
        const USER_AGENT_OWNCLOUD_IOS = '/^Mozilla\/5\.0 \(iOS\) ownCloud\-iOS.*$/';
+       /**
+        * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_ANDROID instead
+        */
        const USER_AGENT_OWNCLOUD_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
+       /**
+        * @deprecated use \OCP\IRequest::USER_AGENT_CLIENT_DESKTOP instead
+        */
        const USER_AGENT_OWNCLOUD_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
-       const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)$/';
 
        protected $inputStream;
        protected $content;
index 86756413cd88d9887b597da9616173129a9a8195..4db1c18b9c11b3298739d730ba3e780ceca30bf6 100644 (file)
@@ -61,6 +61,20 @@ namespace OCP;
  * @since 6.0.0
  */
 interface IRequest {
+       /**
+        * @since 9.1.0
+        */
+       const USER_AGENT_CLIENT_ANDROID = '/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/';
+
+       /**
+        * @since 9.1.0
+        */
+       const USER_AGENT_CLIENT_DESKTOP = '/^Mozilla\/5\.0 \([A-Za-z ]+\) (mirall|csyncoC)\/.*$/';
+
+       /**
+        * @since 9.1.0
+        */
+       const USER_AGENT_CLIENT_IOS = '/^Mozilla\/5\.0 \(iOS\) ownCloud\-iOS.*$/';
 
        /**
         * @param string $name