1/* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkTS 19 */ 20 21/** 22 * The uri module provides utilities for URI resolution and parsing. 23 * 24 * @namespace uri 25 * @syscap SystemCapability.Utils.Lang 26 * @since 8 27 */ 28/** 29 * The uri module provides APIs for parsing URI strings that comply with the RFC3986 standard. 30 * This standard defines how to encode and parse the identifiers used to locate network resources. 31 * The module does not support parsing of URIs in non-standard scenarios. 32 * 33 * @namespace uri 34 * @syscap SystemCapability.Utils.Lang 35 * @crossplatform 36 * @since 10 37 */ 38/** 39 * The uri module provides APIs for parsing URI strings that comply with the RFC3986 standard. 40 * This standard defines how to encode and parse the identifiers used to locate network resources. 41 * The module does not support parsing of URIs in non-standard scenarios. 42 * 43 * @namespace uri 44 * @syscap SystemCapability.Utils.Lang 45 * @crossplatform 46 * @atomicservice 47 * @since arkts {'1.1':'11', '1.2':'20'} 48 * @arkts 1.1&1.2 49 */ 50declare namespace uri { 51 /** 52 * URI Represents a Uniform Resource Identifier (URI) reference. 53 * 54 * @syscap SystemCapability.Utils.Lang 55 * @since 8 56 * @name URI 57 */ 58 /** 59 * URI Represents a Uniform Resource Identifier (URI) reference. 60 * 61 * @syscap SystemCapability.Utils.Lang 62 * @crossplatform 63 * @since 10 64 * @name URI 65 */ 66 /** 67 * URI Represents a Uniform Resource Identifier (URI) reference. 68 * 69 * @syscap SystemCapability.Utils.Lang 70 * @crossplatform 71 * @atomicservice 72 * @since arkts {'1.1':'11', '1.2':'20'} 73 * @arkts 1.1&1.2 74 * @name URI 75 */ 76 class URI { 77 /** 78 * URI constructor, which is used to instantiate a URI object. 79 * uri: Constructs a URI by parsing a given string. 80 * 81 * @param { string } uri - uri uri 82 * @throws { BusinessError } 401 - Parameter error. Possible causes: 83 * 1.Mandatory parameters are left unspecified; 84 * 2.Incorrect parameter types; 85 * 3.Parameter verification failed. 86 * @throws { BusinessError } 10200002 - Invalid uri string. 87 * @syscap SystemCapability.Utils.Lang 88 * @since 8 89 */ 90 /** 91 * A constructor used to create a URI instance. 92 * 93 * @param { string } uri - Input object. 94 * @throws { BusinessError } 401 - Parameter error. Possible causes: 95 * 1.Mandatory parameters are left unspecified; 96 * 2.Incorrect parameter types; 97 * 3.Parameter verification failed. 98 * @throws { BusinessError } 10200002 - Invalid uri string. 99 * @syscap SystemCapability.Utils.Lang 100 * @crossplatform 101 * @since 10 102 */ 103 /** 104 * A constructor used to create a URI instance. 105 * 106 * @param { string } uri - Input object. 107 * @throws { BusinessError } 401 - Parameter error. Possible causes: 108 * 1.Mandatory parameters are left unspecified; 109 * 2.Incorrect parameter types; 110 * 3.Parameter verification failed. 111 * @throws { BusinessError } 10200002 - Invalid uri string. 112 * @syscap SystemCapability.Utils.Lang 113 * @crossplatform 114 * @atomicservice 115 * @since arkts {'1.1':'11', '1.2':'20'} 116 * @arkts 1.1&1.2 117 */ 118 constructor(uri: string); 119 /** 120 * Returns the serialized URI as a string. 121 * 122 * @returns { string } Returns the serialized URI as a string. 123 * @syscap SystemCapability.Utils.Lang 124 * @since 8 125 */ 126 /** 127 * Converts this URI into an encoded string. 128 * 129 * @returns { string } URI in a serialized string. 130 * @syscap SystemCapability.Utils.Lang 131 * @crossplatform 132 * @since 10 133 */ 134 /** 135 * Converts this URI into an encoded string. 136 * 137 * @returns { string } URI in a serialized string. 138 * @syscap SystemCapability.Utils.Lang 139 * @crossplatform 140 * @atomicservice 141 * @since arkts {'1.1':'11', '1.2':'20'} 142 * @arkts 1.1&1.2 143 */ 144 toString(): string; 145 146 /** 147 * Check whether this URI is equivalent to other URI objects. 148 * 149 * @param { URI } other - other other URI object to be compared 150 * @returns { boolean } boolean Tests whether this URI is equivalent to other URI objects. 151 * @syscap SystemCapability.Utils.Lang 152 * @since 8 153 * @deprecated since 9 154 * @useinstead ohos.uri.URI.equalsTo 155 */ 156 equals(other: URI): boolean; 157 158 /** 159 * Check whether this URI is equivalent to other URI objects. 160 * 161 * @param { URI } other - other other URI object to be compared 162 * @returns { boolean } boolean Tests whether this URI is equivalent to other URI objects. 163 * @throws { BusinessError } 401 - Parameter error. Possible causes: 164 * 1.Mandatory parameters are left unspecified; 165 * 2.Incorrect parameter types. 166 * @syscap SystemCapability.Utils.Lang 167 * @since 9 168 */ 169 /** 170 * Checks whether this URI is the same as another URI object. 171 * 172 * @param { URI } other - URI object to compare. 173 * @returns { boolean } boolean Tests whether this URI is equivalent to other URI objects. 174 * @throws { BusinessError } 401 - Parameter error. Possible causes: 175 * 1.Mandatory parameters are left unspecified; 176 * 2.Incorrect parameter types. 177 * @syscap SystemCapability.Utils.Lang 178 * @crossplatform 179 * @since 10 180 */ 181 /** 182 * Checks whether this URI is the same as another URI object. 183 * 184 * @param { URI } other - URI object to compare. 185 * @returns { boolean } boolean Tests whether this URI is equivalent to other URI objects. 186 * @throws { BusinessError } 401 - Parameter error. Possible causes: 187 * 1.Mandatory parameters are left unspecified; 188 * 2.Incorrect parameter types. 189 * @syscap SystemCapability.Utils.Lang 190 * @crossplatform 191 * @atomicservice 192 * @since arkts {'1.1':'11', '1.2':'20'} 193 * @arkts 1.1&1.2 194 */ 195 equalsTo(other: URI): boolean; 196 197 /** 198 * Indicates whether this URI is an absolute URI. 199 * 200 * @returns { boolean } boolean Indicates whether the URI is an absolute URI (whether the scheme component is defined). 201 * @syscap SystemCapability.Utils.Lang 202 * @since 8 203 */ 204 /** 205 * Checks whether this URI is an absolute URI (whether the scheme component is defined). 206 * 207 * @returns { boolean } boolean Indicates whether the URI is an absolute URI (whether the scheme component is defined). 208 * @syscap SystemCapability.Utils.Lang 209 * @crossplatform 210 * @since 10 211 */ 212 /** 213 * Checks whether this URI is an absolute URI (whether the scheme component is defined). 214 * 215 * @returns { boolean } boolean Indicates whether the URI is an absolute URI (whether the scheme component is defined). 216 * @syscap SystemCapability.Utils.Lang 217 * @crossplatform 218 * @atomicservice 219 * @since arkts {'1.1':'11', '1.2':'20'} 220 * @arkts 1.1&1.2 221 */ 222 checkIsAbsolute(): boolean; 223 224 /** 225 * Normalize the path of this URI, It is not safe to call the normalize interface with URI. 226 * 227 * @returns { URI } URI Used to normalize the path of this URI and return a URI object whose path has been normalized. 228 * @syscap SystemCapability.Utils.Lang 229 * @since 8 230 */ 231 /** 232 * Normalizes the path of this URI. 233 * 234 * @returns { URI } URI Used to normalize the path of this URI and return a URI object whose path has been normalized. 235 * @syscap SystemCapability.Utils.Lang 236 * @crossplatform 237 * @since 10 238 */ 239 /** 240 * Normalizes the path of this URI. 241 * 242 * @returns { URI } URI Used to normalize the path of this URI and return a URI object whose path has been normalized. 243 * @syscap SystemCapability.Utils.Lang 244 * @crossplatform 245 * @atomicservice 246 * @since arkts {'1.1':'11', '1.2':'20'} 247 * @arkts 1.1&1.2 248 */ 249 normalize(): URI; 250 /** 251 * Obtains the first value of a given key from the query component of this URI. If the query component contains encoded content, 252 * this API decodes the key before obtaining the value. 253 * 254 * @param { string } key - Given the first value of the key. 255 * @returns { string } Return decoded value. 256 * @throws { BusinessError } 401 - Parameter error. Possible causes: 257 * 1.Mandatory parameters are left unspecified; 258 * 2.Incorrect parameter types. 259 * @syscap SystemCapability.Utils.Lang 260 * @crossplatform 261 * @atomicservice 262 * @since 12 263 */ 264 getQueryValue(key: string): string; 265 /** 266 * Obtains the first value of a given key from the query component of this URI. If the query component contains encoded content, 267 * this API decodes the key before obtaining the value. 268 * 269 * @param { string } key - Given the first value of the key. 270 * @returns { string | null } Return decoded value, If no corresponding value is found return a null object. 271 * @throws { BusinessError } 401 - Parameter error. Possible causes: 272 * 1.Mandatory parameters are left unspecified; 273 * 2.Incorrect parameter types. 274 * @syscap SystemCapability.Utils.Lang 275 * @crossplatform 276 * @atomicservice 277 * @since 20 278 * @arkts 1.2 279 */ 280 getQueryValue(key: string): string | null; 281 /** 282 * Adds a query parameter to this URI to create a new URI, while keeping the existing URI unchanged. 283 * 284 * @param { string } [key] - Key of the query parameter. 285 * @param { string } [value] - Value of the query parameter. 286 * @returns { URI } Return URI object. 287 * @throws { BusinessError } 401 - Parameter error. Possible causes: 288 * 1.Mandatory parameters are left unspecified; 289 * 2.Incorrect parameter types. 290 * @syscap SystemCapability.Utils.Lang 291 * @crossplatform 292 * @atomicservice 293 * @since arkts {'1.1':'12', '1.2':'20'} 294 * @arkts 1.1&1.2 295 */ 296 addQueryValue(key: string, value: string): URI; 297 /** 298 * Obtains all non-repeated keys in the query component of this URI. 299 * 300 * @returns { string[] } Return a set of decoded names. 301 * @syscap SystemCapability.Utils.Lang 302 * @crossplatform 303 * @atomicservice 304 * @since 12 305 */ 306 getQueryNames(): string[]; 307 /** 308 * Obtains all non-repeated keys in the query component of this URI. 309 * 310 * @returns { Array<string> } Return a set of decoded names. 311 * @syscap SystemCapability.Utils.Lang 312 * @crossplatform 313 * @atomicservice 314 * @since 20 315 * @arkts 1.2 316 */ 317 getQueryNames(): Array<string>; 318 /** 319 * Obtains the values of a given key from the query component of this URI. 320 * 321 * @param { string } key - Key of the URI query parameter. 322 * @returns { string[] } Return a set of decoded values. 323 * @throws { BusinessError } 401 - Parameter error. Possible causes: 324 * 1.Mandatory parameters are left unspecified; 325 * 2.Incorrect parameter types. 326 * @syscap SystemCapability.Utils.Lang 327 * @crossplatform 328 * @atomicservice 329 * @since 12 330 */ 331 getQueryValues(key: string): string[]; 332 333 /** 334 * Obtains the values of a given key from the query component of this URI. 335 * 336 * @param { string } key - Key of the URI query parameter. 337 * @returns { Array<string> } Return a set of decoded values. 338 * @syscap SystemCapability.Utils.Lang 339 * @crossplatform 340 * @atomicservice 341 * @since 20 342 * @arkts 1.2 343 */ 344 getQueryValues(key: string): Array<string>; 345 /** 346 * Obtains the value of the Boolean type of a query parameter in this URI. 347 * 348 * @param { string } key - Indicates the key value to be queried. 349 * @param { boolean } defaultValue - The default value returned when the key has no query parameters. 350 * @returns { boolean } Query with key value returns true, otherwise returns false. 351 * @throws { BusinessError } 401 - Parameter error. Possible causes: 352 * 1.Mandatory parameters are left unspecified; 353 * 2.Incorrect parameter types. 354 * @syscap SystemCapability.Utils.Lang 355 * @crossplatform 356 * @atomicservice 357 * @since arkts {'1.1':'12', '1.2':'20'} 358 * @arkts 1.1&1.2 359 */ 360 getBooleanQueryValue(key: string, defaultValue: boolean): boolean; 361 /** 362 * Clears the query component of this URI to create a new URI, while keeping the existing URI object unchanged. 363 * 364 * @returns { URI } After clearing, return the URI object. 365 * @syscap SystemCapability.Utils.Lang 366 * @crossplatform 367 * @atomicservice 368 * @since arkts {'1.1':'12', '1.2':'20'} 369 * @arkts 1.1&1.2 370 */ 371 clearQuery(): URI; 372 /** 373 * Obtains the last segment of this URI. 374 * 375 * @returns { string } Returns the last decoded segment, or null if the path is empty. 376 * @syscap SystemCapability.Utils.Lang 377 * @crossplatform 378 * @atomicservice 379 * @since arkts {'1.1':'12', '1.2':'20'} 380 * @arkts 1.1&1.2 381 */ 382 getLastSegment(): string; 383 /** 384 * Gets the decoded path segments. 385 * 386 * @returns { string[] } Return decoded path segments, each without a leading or trailing "/". 387 * @syscap SystemCapability.Utils.Lang 388 * @crossplatform 389 * @atomicservice 390 * @since 12 391 */ 392 getSegment(): string[]; 393 /** 394 * Obtains all segments of this URI. 395 * 396 * @returns { Array<string> } Return decoded path segments, each without a leading or trailing "/". 397 * @syscap SystemCapability.Utils.Lang 398 * @crossplatform 399 * @atomicservice 400 * @since 20 401 * @arkts 1.2 402 */ 403 getSegment(): Array<string>; 404 /** 405 * Encodes a given field, appends it to the path component of this URI to create a new URI, and returns the new URI, 406 * while keeping the existing URI unchanged. 407 * 408 * @param { string } [pathSegment] - path segment to be added. 409 * @returns { URI } After adding, return the URI object. 410 * @throws { BusinessError } 401 - Parameter error. Possible causes: 411 * 1.Mandatory parameters are left unspecified; 412 * 2.Incorrect parameter types. 413 * @syscap SystemCapability.Utils.Lang 414 * @crossplatform 415 * @atomicservice 416 * @since arkts {'1.1':'12', '1.2':'20'} 417 * @arkts 1.1&1.2 418 */ 419 addSegment(pathSegment: string): URI; 420 /** 421 * Appends an encoded field to the path component of this URI to create a new URI and returns the new URI, 422 * while keeping the existing URI unchanged. 423 * 424 * @param { string } pathSegment - Encoding path segment to be added. 425 * @returns { URI } After adding, return the URI object. 426 * @throws { BusinessError } 401 - Parameter error. Possible causes: 427 * 1.Mandatory parameters are left unspecified; 428 * 2.Incorrect parameter types. 429 * @syscap SystemCapability.Utils.Lang 430 * @crossplatform 431 * @atomicservice 432 * @since arkts {'1.1':'12', '1.2':'20'} 433 * @arkts 1.1&1.2 434 */ 435 addEncodedSegment(pathSegment: string): URI; 436 /** 437 * Checks whether this URI is a hierarchical URI. The URI that starts with a slash (/) in scheme-specific-part is a 438 * hierarchical URI. Relative URIs are also hierarchical. 439 * 440 * @returns { boolean } Return true as Hierarchical, otherwise return false. 441 * @syscap SystemCapability.Utils.Lang 442 * @crossplatform 443 * @atomicservice 444 * @since arkts {'1.1':'12', '1.2':'20'} 445 * @arkts 1.1&1.2 446 */ 447 checkHierarchical(): boolean; 448 /** 449 * Checks whether this URI is an opaque URI. The URI that does not start with a slash (/) is an opaque URI. 450 * 451 * @returns { boolean } Return true as Opaque, otherwise return false. 452 * @syscap SystemCapability.Utils.Lang 453 * @crossplatform 454 * @atomicservice 455 * @since arkts {'1.1':'12', '1.2':'20'} 456 * @arkts 1.1&1.2 457 */ 458 checkOpaque(): boolean; 459 /** 460 * Determine whether URI is Relative. 461 * 462 * @returns { boolean } Return true as Relative, otherwise return false. 463 * @syscap SystemCapability.Utils.Lang 464 * @crossplatform 465 * @atomicservice 466 * @since arkts {'1.1':'12', '1.2':'20'} 467 * @arkts 1.1&1.2 468 */ 469 checkRelative(): boolean; 470 /** 471 * Creates a URI based on the provided scheme, scheme-specific-part, and fragment components. 472 * 473 * @param { string } scheme - of the URI. 474 * @param { string } ssp -scheme-specific-part, everything between the scheme separator (':') and the fragment 475 * separator ('#'), which will get encoded. 476 * @param { string } fragment - fragment, everything after the '#', null if undefined, will get encoded. 477 * @returns { URI } Return Uri consisting of a given scheme, SSP, and fragment. 478 * @throws { BusinessError } 401 - Parameter error. Possible causes: 479 * 1.Mandatory parameters are left unspecified; 480 * 2.Incorrect parameter types. 481 * @syscap SystemCapability.Utils.Lang 482 * @crossplatform 483 * @atomicservice 484 * @since arkts {'1.1':'12', '1.2':'20'} 485 * @arkts 1.1&1.2 486 */ 487 static createFromParts(scheme: string, ssp: string, fragment: string): URI; 488 /** 489 * Gets the protocol part of the URI. 490 * 491 * @type { string } 492 * @syscap SystemCapability.Utils.Lang 493 * @since 8 494 */ 495 /** 496 * Gets the protocol part of the URI. 497 * 498 * @type { string } 499 * @syscap SystemCapability.Utils.Lang 500 * @crossplatform 501 * @since 10 502 */ 503 /** 504 * Gets the protocol part of the URI. 505 * 506 * @type { string } 507 * @syscap SystemCapability.Utils.Lang 508 * @crossplatform 509 * @atomicservice 510 * @since 11 511 */ 512 /** 513 * Gets/Sets the protocol part of the URI. 514 * 515 * @type { string } 516 * @syscap SystemCapability.Utils.Lang 517 * @crossplatform 518 * @atomicservice 519 * @since 12 520 */ 521 scheme: string; 522 523 /** 524 * Obtains the user information part of the URI. 525 * 526 * @type { string } 527 * @syscap SystemCapability.Utils.Lang 528 * @since 8 529 */ 530 /** 531 * Obtains the user information part of the URI. 532 * 533 * @type { string } 534 * @syscap SystemCapability.Utils.Lang 535 * @crossplatform 536 * @since 10 537 */ 538 /** 539 * Obtains the user information part of the URI. 540 * 541 * @type { string } 542 * @syscap SystemCapability.Utils.Lang 543 * @crossplatform 544 * @atomicservice 545 * @since 11 546 */ 547 /** 548 * Gets/Sets Obtains the user information part of the URI. 549 * 550 * @type { string } 551 * @syscap SystemCapability.Utils.Lang 552 * @crossplatform 553 * @atomicservice 554 * @since 12 555 */ 556 userInfo: string; 557 558 /** 559 * Gets the hostname portion of the URI without a port. 560 * 561 * @type { string } 562 * @syscap SystemCapability.Utils.Lang 563 * @since 8 564 */ 565 /** 566 * Gets the hostname portion of the URI without a port. 567 * 568 * @type { string } 569 * @syscap SystemCapability.Utils.Lang 570 * @crossplatform 571 * @since 10 572 */ 573 /** 574 * Gets the hostname portion of the URI without a port. 575 * 576 * @type { string } 577 * @syscap SystemCapability.Utils.Lang 578 * @crossplatform 579 * @atomicservice 580 * @since 11 581 */ 582 host: string; 583 584 /** 585 * Gets the port portion of the URI. 586 * 587 * @type { string } 588 * @syscap SystemCapability.Utils.Lang 589 * @since 8 590 */ 591 /** 592 * Gets the port portion of the URI. 593 * 594 * @type { string } 595 * @syscap SystemCapability.Utils.Lang 596 * @crossplatform 597 * @since 10 598 */ 599 /** 600 * Gets the port portion of the URI. 601 * 602 * @type { string } 603 * @syscap SystemCapability.Utils.Lang 604 * @crossplatform 605 * @atomicservice 606 * @since 11 607 */ 608 port: string; 609 610 /** 611 * Gets the path portion of the URI. 612 * 613 * @type { string } 614 * @syscap SystemCapability.Utils.Lang 615 * @since 8 616 */ 617 /** 618 * Gets the path portion of the URI. 619 * 620 * @type { string } 621 * @syscap SystemCapability.Utils.Lang 622 * @crossplatform 623 * @since 10 624 */ 625 /** 626 * Gets the path portion of the URI. 627 * 628 * @type { string } 629 * @syscap SystemCapability.Utils.Lang 630 * @crossplatform 631 * @atomicservice 632 * @since 11 633 */ 634 /** 635 * Gets/Sets the path portion of the URI. 636 * 637 * @type { string } 638 * @syscap SystemCapability.Utils.Lang 639 * @crossplatform 640 * @atomicservice 641 * @since 12 642 */ 643 path: string; 644 645 /** 646 * Gets the query portion of the URI 647 * 648 * @type { string } 649 * @syscap SystemCapability.Utils.Lang 650 * @since 8 651 */ 652 /** 653 * Gets the query portion of the URI 654 * 655 * @type { string } 656 * @syscap SystemCapability.Utils.Lang 657 * @crossplatform 658 * @since 10 659 */ 660 /** 661 * Gets the query portion of the URI 662 * 663 * @type { string } 664 * @syscap SystemCapability.Utils.Lang 665 * @crossplatform 666 * @atomicservice 667 * @since 11 668 */ 669 /** 670 * Gets/Sets the query portion of the URI 671 * 672 * @type { string } 673 * @syscap SystemCapability.Utils.Lang 674 * @crossplatform 675 * @atomicservice 676 * @since 12 677 */ 678 query: string; 679 680 /** 681 * Gets the fragment part of the URI. 682 * 683 * @type { string } 684 * @syscap SystemCapability.Utils.Lang 685 * @since 8 686 */ 687 /** 688 * Gets the fragment part of the URI. 689 * 690 * @type { string } 691 * @syscap SystemCapability.Utils.Lang 692 * @crossplatform 693 * @since 10 694 */ 695 /** 696 * Gets the fragment part of the URI. 697 * 698 * @type { string } 699 * @syscap SystemCapability.Utils.Lang 700 * @crossplatform 701 * @atomicservice 702 * @since 11 703 */ 704 /** 705 * Gets/Sets the fragment part of the URI. 706 * 707 * @type { string } 708 * @syscap SystemCapability.Utils.Lang 709 * @crossplatform 710 * @atomicservice 711 * @since 12 712 */ 713 fragment: string; 714 715 /** 716 * Gets the decoding permission component part of this URI. 717 * 718 * @type { string } 719 * @syscap SystemCapability.Utils.Lang 720 * @since 8 721 */ 722 /** 723 * Gets the decoding permission component part of this URI. 724 * 725 * @type { string } 726 * @syscap SystemCapability.Utils.Lang 727 * @crossplatform 728 * @since 10 729 */ 730 /** 731 * Gets the decoding permission component part of this URI. 732 * 733 * @type { string } 734 * @syscap SystemCapability.Utils.Lang 735 * @crossplatform 736 * @atomicservice 737 * @since 11 738 */ 739 /** 740 * Gets/Sets the decoding permission component part of this URI. 741 * 742 * @type { string } 743 * @syscap SystemCapability.Utils.Lang 744 * @crossplatform 745 * @atomicservice 746 * @since 12 747 */ 748 authority: string; 749 750 /** 751 * Gets the decoding scheme-specific part of the URI. 752 * 753 * @type { string } 754 * @syscap SystemCapability.Utils.Lang 755 * @since 8 756 */ 757 /** 758 * Gets the decoding scheme-specific part of the URI. 759 * 760 * @type { string } 761 * @syscap SystemCapability.Utils.Lang 762 * @crossplatform 763 * @since 10 764 */ 765 /** 766 * Gets the decoding scheme-specific part of the URI. 767 * 768 * @type { string } 769 * @syscap SystemCapability.Utils.Lang 770 * @crossplatform 771 * @atomicservice 772 * @since 11 773 */ 774 /** 775 * Gets/Sets the decoding scheme-specific part of the URI. 776 * 777 * @type { string } 778 * @syscap SystemCapability.Utils.Lang 779 * @crossplatform 780 * @atomicservice 781 * @since 12 782 */ 783 ssp: string; 784 /** 785 * Gets/Sets Obtains the encoded user information part of the URI. 786 * 787 * @type { string } 788 * @syscap SystemCapability.Utils.Lang 789 * @crossplatform 790 * @atomicservice 791 * @since 12 792 */ 793 encodedUserInfo: string; 794 /** 795 * Gets/Sets the encoded path portion of the URI. 796 * 797 * @type { string } 798 * @syscap SystemCapability.Utils.Lang 799 * @crossplatform 800 * @atomicservice 801 * @since 12 802 */ 803 encodedPath: string; 804 /** 805 * Gets/Sets the encoded query component from this URI. 806 * 807 * @type { string } 808 * @syscap SystemCapability.Utils.Lang 809 * @crossplatform 810 * @atomicservice 811 * @since 12 812 */ 813 encodedQuery: string; 814 /** 815 * Gets/Sets the encoded fragment part of this URI, everything after the '#'. 816 * 817 * @type { string } 818 * @syscap SystemCapability.Utils.Lang 819 * @crossplatform 820 * @atomicservice 821 * @since 12 822 */ 823 encodedFragment: string; 824 /** 825 * Gets/Sets the encoded authority part of this URI. 826 * 827 * @type { string } 828 * @syscap SystemCapability.Utils.Lang 829 * @crossplatform 830 * @atomicservice 831 * @since 12 832 */ 833 encodedAuthority: string; 834 /** 835 * Gets/Sets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and 836 * the fragment separator '#'. 837 * 838 * @type { string } 839 * @syscap SystemCapability.Utils.Lang 840 * @crossplatform 841 * @atomicservice 842 * @since 12 843 */ 844 encodedSSP: string; 845 /** 846 * Gets the protocol part of the URI. 847 * 848 * @type { string | null } 849 * @syscap SystemCapability.Utils.Lang 850 * @crossplatform 851 * @atomicservice 852 * @since 20 853 * @arkts 1.2 854 */ 855 get scheme(): string | null; 856 857 /** 858 * Sets the protocol part of the URI. 859 * 860 * @type { string } 861 * @syscap SystemCapability.Utils.Lang 862 * @crossplatform 863 * @atomicservice 864 * @since 20 865 * @arkts 1.2 866 */ 867 set scheme(input: string | null); 868 869 /** 870 * Gets Obtains the user information part of the URI. 871 * 872 * @type { string | null } 873 * @syscap SystemCapability.Utils.Lang 874 * @crossplatform 875 * @atomicservice 876 * @since 20 877 * @arkts 1.2 878 */ 879 get userInfo(): string | null; 880 881 /** 882 * Sets Obtains the user information part of the URI. 883 * 884 * @type { string } 885 * @syscap SystemCapability.Utils.Lang 886 * @crossplatform 887 * @atomicservice 888 * @since 20 889 * @arkts 1.2 890 */ 891 set userInfo(input: string | null); 892 893 /** 894 * Gets the hostname portion of the URI without a port. 895 * 896 * @type { string | null } 897 * @syscap SystemCapability.Utils.Lang 898 * @since 20 899 * @arkts 1.2 900 */ 901 get host(): string | null; 902 903 /** 904 * Gets the port portion of the URI. 905 * 906 * @type { string } 907 * @syscap SystemCapability.Utils.Lang 908 * @since 20 909 * @arkts 1.2 910 */ 911 get port(): string; 912 913 /** 914 * Gets the path portion of the URI. 915 * 916 * @type { string | null } 917 * @syscap SystemCapability.Utils.Lang 918 * @crossplatform 919 * @atomicservice 920 * @since 20 921 * @arkts 1.2 922 */ 923 get path(): string | null; 924 925 /** 926 * Sets the path portion of the URI. 927 * 928 * @type { string } 929 * @syscap SystemCapability.Utils.Lang 930 * @crossplatform 931 * @atomicservice 932 * @since 20 933 * @arkts 1.2 934 */ 935 set path(input: string | null); 936 937 /** 938 * Gets the query portion of the URI 939 * 940 * @type { string | null } 941 * @syscap SystemCapability.Utils.Lang 942 * @crossplatform 943 * @atomicservice 944 * @since 20 945 * @arkts 1.2 946 */ 947 get query(): string | null; 948 949 /** 950 * Sets the query portion of the URI 951 * 952 * @type { string } 953 * @syscap SystemCapability.Utils.Lang 954 * @crossplatform 955 * @atomicservice 956 * @since 20 957 * @arkts 1.2 958 */ 959 set query(input: string | null); 960 961 /** 962 * Gets the fragment part of the URI. 963 * 964 * @type { string | null } 965 * @syscap SystemCapability.Utils.Lang 966 * @crossplatform 967 * @atomicservice 968 * @since 20 969 * @arkts 1.2 970 */ 971 get fragment(): string | null; 972 973 /** 974 * Sets the fragment part of the URI. 975 * 976 * @type { string } 977 * @syscap SystemCapability.Utils.Lang 978 * @crossplatform 979 * @atomicservice 980 * @since 20 981 * @arkts 1.2 982 */ 983 set fragment(input: string | null); 984 985 /** 986 * Gets the decoding permission component part of this URI. 987 * 988 * @type { string | null } 989 * @syscap SystemCapability.Utils.Lang 990 * @crossplatform 991 * @atomicservice 992 * @since 20 993 * @arkts 1.2 994 */ 995 get authority(): string | null; 996 997 /** 998 * Sets the decoding permission component part of this URI. 999 * 1000 * @type { string } 1001 * @syscap SystemCapability.Utils.Lang 1002 * @crossplatform 1003 * @atomicservice 1004 * @since 20 1005 * @arkts 1.2 1006 */ 1007 set authority(input: string | null); 1008 1009 /** 1010 * Gets the decoding scheme-specific part of the URI. 1011 * 1012 * @type { string } 1013 * @syscap SystemCapability.Utils.Lang 1014 * @crossplatform 1015 * @atomicservice 1016 * @since 20 1017 * @arkts 1.2 1018 */ 1019 get ssp(): string; 1020 1021 /** 1022 * Sets the decoding scheme-specific part of the URI. 1023 * 1024 * @type { string } 1025 * @syscap SystemCapability.Utils.Lang 1026 * @crossplatform 1027 * @atomicservice 1028 * @since 20 1029 * @arkts 1.2 1030 */ 1031 set ssp(input: string | null); 1032 1033 /** 1034 * Gets Obtains the encoded user information part of the URI. 1035 * 1036 * @type { string | null } 1037 * @syscap SystemCapability.Utils.Lang 1038 * @crossplatform 1039 * @atomicservice 1040 * @since 20 1041 * @arkts 1.2 1042 */ 1043 get encodedUserInfo(): string | null; 1044 /** 1045 * Sets Obtains the encoded user information part of the URI. 1046 * 1047 * @type { string } 1048 * @syscap SystemCapability.Utils.Lang 1049 * @crossplatform 1050 * @atomicservice 1051 * @since 20 1052 * @arkts 1.2 1053 */ 1054 set encodedUserInfo(input: string | null); 1055 1056 /** 1057 * Gets the encoded path portion of the URI. 1058 * 1059 * @type { string | null } 1060 * @syscap SystemCapability.Utils.Lang 1061 * @crossplatform 1062 * @atomicservice 1063 * @since 20 1064 * @arkts 1.2 1065 */ 1066 get encodedPath(): string | null; 1067 /** 1068 * Sets the encoded path portion of the URI. 1069 * 1070 * @type { string } 1071 * @syscap SystemCapability.Utils.Lang 1072 * @crossplatform 1073 * @atomicservice 1074 * @since 20 1075 * @arkts 1.2 1076 */ 1077 set encodedPath(input: string | null); 1078 1079 /** 1080 * Gets the encoded query component from this URI. 1081 * 1082 * @type { string | null } 1083 * @syscap SystemCapability.Utils.Lang 1084 * @crossplatform 1085 * @atomicservice 1086 * @since 20 1087 * @arkts 1.2 1088 */ 1089 get encodedQuery(): string | null; 1090 /** 1091 * Sets the encoded query component from this URI. 1092 * 1093 * @type { string } 1094 * @syscap SystemCapability.Utils.Lang 1095 * @crossplatform 1096 * @atomicservice 1097 * @since 20 1098 * @arkts 1.2 1099 */ 1100 set encodedQuery(input: string | null); 1101 1102 /** 1103 * Gets the encoded fragment part of this URI, everything after the '#'. 1104 * 1105 * @type { string | null } 1106 * @syscap SystemCapability.Utils.Lang 1107 * @crossplatform 1108 * @atomicservice 1109 * @since 20 1110 * @arkts 1.2 1111 */ 1112 get encodedFragment(): string | null; 1113 /** 1114 * Sets the encoded fragment part of this URI, everything after the '#'. 1115 * 1116 * @type { string } 1117 * @syscap SystemCapability.Utils.Lang 1118 * @crossplatform 1119 * @atomicservice 1120 * @since 20 1121 * @arkts 1.2 1122 */ 1123 set encodedFragment(input: string | null); 1124 1125 /** 1126 * Gets the encoded authority part of this URI. 1127 * 1128 * @type { string | null } 1129 * @syscap SystemCapability.Utils.Lang 1130 * @crossplatform 1131 * @atomicservice 1132 * @since 20 1133 * @arkts 1.2 1134 */ 1135 get encodedAuthority(): string | null; 1136 /** 1137 * Sets the encoded authority part of this URI. 1138 * 1139 * @type { string } 1140 * @syscap SystemCapability.Utils.Lang 1141 * @crossplatform 1142 * @atomicservice 1143 * @since 20 1144 * @arkts 1.2 1145 */ 1146 set encodedAuthority(input: string | null); 1147 1148 /** 1149 * Gets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and 1150 * the fragment separator '#'. 1151 * 1152 * @type { string } 1153 * @syscap SystemCapability.Utils.Lang 1154 * @crossplatform 1155 * @atomicservice 1156 * @since 20 1157 * @arkts 1.2 1158 */ 1159 get encodedSSP(): string; 1160 1161 /** 1162 * Sets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and 1163 * the fragment separator '#'. 1164 * 1165 * @type { string } 1166 * @syscap SystemCapability.Utils.Lang 1167 * @crossplatform 1168 * @atomicservice 1169 * @since 20 1170 * @arkts 1.2 1171 */ 1172 set encodedSSP(input: string | null); 1173 } 1174} 1175export default uri; 1176