summaryrefslogtreecommitdiffhomepage
path: root/Kernel/CFKit/URL.hxx
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-02 20:11:24 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-02 20:11:24 +0200
commit59578978610f6af245f571a011694a51d94dc530 (patch)
tree3553807ef1c8095248520ee823c1426aef8738d8 /Kernel/CFKit/URL.hxx
parent9afcd1c001703c32964fed5906f36a2d913e91e9 (diff)
[unstable] [META] refactor whole project.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/CFKit/URL.hxx')
-rw-r--r--Kernel/CFKit/URL.hxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/Kernel/CFKit/URL.hxx b/Kernel/CFKit/URL.hxx
new file mode 100644
index 00000000..aa671f4f
--- /dev/null
+++ b/Kernel/CFKit/URL.hxx
@@ -0,0 +1,33 @@
+/* -------------------------------------------
+
+ Copyright ZKA Technologies
+
+------------------------------------------- */
+
+#ifndef _INC_URL_HPP_
+#define _INC_URL_HPP_
+
+#include <NewKit/Defines.hxx>
+#include <NewKit/String.hxx>
+
+namespace Kernel
+{
+ class URL final
+ {
+ public:
+ explicit URL(StringView& strUrl);
+ ~URL();
+
+ public:
+ Ref<ErrorOr<StringView>> Location() noexcept;
+ Ref<ErrorOr<StringView>> Protocol() noexcept;
+
+ private:
+ Ref<StringView> fUrlView;
+ };
+
+ ErrorOr<StringView> url_extract_location(const Char* url);
+ ErrorOr<StringView> url_extract_protocol(const Char* url);
+} // namespace Kernel
+
+#endif /* ifndef _INC_URL_HPP_ */