Add deprecation comments to folly::makeFuture.
[folly.git] / folly / Uri.h
index de693baa79165eae7b994b8665269803216c9e19..bfb88894d03b017370f9d5372c09fb7d353f87eb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#ifndef FOLLY_URI_H_
+#pragma once
 #define FOLLY_URI_H_
 
-#include <folly/String.h>
+#include <string>
 #include <vector>
 
+#include <folly/String.h>
+
 namespace folly {
 
 /**
@@ -45,14 +47,14 @@ class Uri {
    */
   explicit Uri(StringPiece str);
 
-  const fbstring& scheme() const { return scheme_; }
-  const fbstring& username() const { return username_; }
-  const fbstring& password() const { return password_; }
+  const std::string& scheme() const { return scheme_; }
+  const std::string& username() const { return username_; }
+  const std::string& password() const { return password_; }
   /**
    * Get host part of URI. If host is an IPv6 address, square brackets will be
    * returned, for example: "[::1]".
    */
-  const fbstring& host() const { return host_; }
+  const std::string& host() const { return host_; }
   /**
    * Get host part of URI. If host is an IPv6 address, square brackets will not
    * be returned, for exmaple "::1"; otherwise it returns the same thing as
@@ -62,13 +64,13 @@ class Uri {
    * or API that connects to that host/port; e.g. getaddrinfo() only understands
    * IPv6 host without square brackets
    */
-  fbstring hostname() const;
+  std::string hostname() const;
   uint16_t port() const { return port_; }
-  const fbstring& path() const { return path_; }
-  const fbstring& query() const { return query_; }
-  const fbstring& fragment() const { return fragment_; }
+  const std::string& path() const { return path_; }
+  const std::string& query() const { return query_; }
+  const std::string& fragment() const { return fragment_; }
 
-  fbstring authority() const;
+  std::string authority() const;
 
   template <class String>
   String toString() const;
@@ -101,23 +103,21 @@ class Uri {
    *          pair of which the first element is parameter name and the second
    *          one is parameter value
    */
-  const std::vector<std::pair<fbstring, fbstring>>& getQueryParams();
+  const std::vector<std::pair<std::string, std::string>>& getQueryParams();
 
  private:
-  fbstring scheme_;
-  fbstring username_;
-  fbstring password_;
-  fbstring host_;
+  std::string scheme_;
+  std::string username_;
+  std::string password_;
+  std::string host_;
   bool hasAuthority_;
   uint16_t port_;
-  fbstring path_;
-  fbstring query_;
-  fbstring fragment_;
-  std::vector<std::pair<fbstring, fbstring>> queryParams_;
+  std::string path_;
+  std::string query_;
+  std::string fragment_;
+  std::vector<std::pair<std::string, std::string>> queryParams_;
 };
 
-}  // namespace folly
+} // namespace folly
 
 #include <folly/Uri-inl.h>
-
-#endif /* FOLLY_URI_H_ */