CPUriAddress

Objective-C

@interface CPUriAddress : NSObject

Swift

class CPUriAddress : NSObject

An UriAddress is used to indicate the originator of a request, the destination of a request, and to specify any redirections of the request.

Since

1.0.0
  • The username to include in this address.

    Since

    1.0.0

    Declaration

    Objective-C

    @property (nonatomic, strong, nonnull) NSString *username;

    Swift

    var username: String { get set }

    Return Value

    String

  • The network domain to include in this address.

    Since

    1.0.0

    Declaration

    Objective-C

    @property (nonatomic, strong, nonnull) NSString *domain;

    Swift

    var domain: String { get set }

    Return Value

    String

  • Constructor method for UriAddress.

    Since

    1.0.0

    Declaration

    Objective-C

    - (nonnull CPUriAddress *)initWithPrimaryContact:
        (nonnull NSString *)primaryContact;

    Swift

    init(primaryContact: String)

    Parameters

    primaryContact

    address of user

    Return Value

    UriAddress instance

  • Constructor method for UriAddress.

    Since

    1.0.0

    Declaration

    Objective-C

    - (nonnull CPUriAddress *)initWithUsername:(nonnull NSString *)username
                                    withDomain:(nullable NSString *)domain;

    Swift

    init(username: String, withDomain domain: String?)

    Parameters

    username

    name of the user

    domain

    domain of the user

    Return Value

    UriAddress instance

  • Static constructor method for UriAddress.

    Since

    1.0.0

    Declaration

    Objective-C

    + (nonnull CPUriAddress *)uriAddressWithUsername:(nonnull NSString *)username
                                          withDomain:(nullable NSString *)domain;

    Parameters

    username

    name of the user

    domain

    domain of the user

    Return Value

    UriAddress instance

  • Retrieve the URI of an address.

    Since

    1.0.0

    Declaration

    Objective-C

    - (nonnull NSString *)getUri;

    Swift

    func getUri() -> String

    Return Value

    NSString format of xxx\@yyyy, where xxx is the username or phonenumber and yyy is the domain