Gjsify LogoGjsify Logo

Hierarchy

  • VCardAttribute

Index

Constructors

  • new VCardAttribute(attr_group: string, attr_name: string): VCardAttribute
  • Creates a new #EVCardAttribute with the specified group and attribute names. The attr_group may be %NULL or the empty string if no group is needed.

    Parameters

    • attr_group: string

      a group name

    • attr_name: string

      an attribute name

    Returns VCardAttribute

Properties

name: string

Methods

  • Prepends param to attr's list of parameters. This takes ownership of param (and all its values).

    Duplicate parameters have their values merged, so that all parameter names in attr are unique. Values are also merged so that uniqueness is preserved.

    Parameters

    Returns void

  • Appends value to param, then prepends param to attr. This takes ownership of param, but not of value.

    This is a convenience method for e_vcard_attribute_param_add_value() and e_vcard_attribute_add_param().

    Parameters

    Returns void

  • add_value(value: string): void
  • add_value_decoded(value: string, len: number): void
  • Encodes value according to the encoding used for attr, and appends it to attr's list of values.

    This should only be used if the #EVCardAttribute has a non-raw encoding (i.e. if it’s encoded in base-64 or quoted-printable encoding).

    Parameters

    • value: string

      an encoded value

    • len: number

      the length of the encoded value, in bytes

    Returns void

  • free(): void
  • get_group(): string
  • get_name(): string
  • get_param(name: string): string[]
  • Gets the list of values for the paramater name from attr. The list and its contents are owned by attr, and must not be freed. If no parameter with the given name exists, %NULL is returned.

    Parameters

    • name: string

      a parameter name

    Returns string[]

  • get_value(): string
  • Gets the value of a single-valued #EVCardAttribute, attr.

    For example, for a FN (full name) attribute, this will return the contact’s full name as a single string.

    This will print a warning if called on an #EVCardAttribute which is not single-valued (i.e. for which e_vcard_attribute_is_single_valued() returns %FALSE). Use e_vcard_attribute_get_values() in such cases instead.

    Returns string

  • Gets the value of a single-valued #EVCardAttribute, attr, decoding it if necessary according to the encoding given in the vCard’s ENCODING attribute.

    This will print a warning if called on an #EVCardAttribute which is not single-valued (i.e. for which e_vcard_attribute_is_single_valued() returns %FALSE). Use e_vcard_attribute_get_values_decoded() in such cases instead.

    Returns GLib.String

  • get_values(): string[]
  • Gets the ordered list of values from attr. The list and its contents are owned by attr, and must not be freed.

    For example, for an ADR (postal address) attribute, this will return the components of the postal address.

    This may be called on a single-valued attribute (i.e. one for which e_vcard_attribute_is_single_valued() returns %TRUE) and will return a one-element list in that case. Alternatively, use e_vcard_attribute_get_value() in such cases.

    Returns string[]

  • Gets the ordered list of values from attr, decoding them if necessary according to the encoding given in the vCard’s ENCODING attribute. The list and its contents are owned by attr, and must not be freed.

    This may be called on a single-valued attribute (i.e. one for which e_vcard_attribute_is_single_valued() returns %TRUE) and will return a one-element list in that case. Alternatively, use e_vcard_attribute_get_value_decoded() in such cases.

    Returns GLib.String[]

  • has_type(typestr: string): boolean
  • Checks if attr has an #EVCardAttributeParam with name %EVC_TYPE and typestr as one of its values.

    For example, for the vCard attribute: |[ TEL;TYPE=WORK,VOICE:(111) 555-1212


    the following holds true:
    |[
    g_assert_true (e_vcard_attribute_has_type (attr, "WORK") == TRUE);
    g_assert_true (e_vcard_attribute_has_type (attr, "voice") == TRUE);
    g_assert_true (e_vcard_attribute_has_type (attr, "HOME") == FALSE);

    Comparisons against typestr are case-insensitive.

    Parameters

    • typestr: string

      a string representing the type

    Returns boolean

  • is_single_valued(): boolean
  • remove_param(param_name: string): void
  • Removes and frees parameter param_name from the attribute attr. Parameter names are guaranteed to be unique, so attr is guaranteed to have no parameters named param_name after this function returns.

    Parameters

    • param_name: string

      a parameter name

    Returns void

  • remove_param_value(param_name: string, s: string): void
  • Removes the value s from the parameter param_name on the attribute attr. If s was the only value for parameter param_name, that parameter is removed entirely from attr and freed.

    Parameters

    • param_name: string

      a parameter name

    • s: string

      a value

    Returns void

  • remove_params(): void
  • remove_value(s: string): void
  • remove_values(): void
  • Creates a new #EVCardAttribute with the specified group and attribute names. The attr_group may be %NULL or the empty string if no group is needed.

    Parameters

    • attr_group: string

      a group name

    • attr_name: string

      an attribute name

    Returns VCardAttribute

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method