Folks.AbstractFieldDetails – folks Reference Manual

# AbstractFieldDetails

## Object Hierarchy:

## Description:

public abstract class AbstractFieldDetails<T> : Object

Object representing any type of value that can have some vCard-like parameters associated with it.

Some contact details, like phone numbers or URLs, can have some extra details associated with them. For instance, a phone number expressed in vcard notation as `tel;type=work,voice:(111) 555-1234` would be represented as a AbstractFieldDetails with value "(111) 555-1234" and with parameters `['type': ('work', 'voice')]`.

The parameter name "type" with values "work", "home", or "other" are common amongst most vCard attributes (and thus most AbstractFieldDetails-derived classes). A "type" of "pref" may be used to indicate a preferred AbstractFieldDetails.value amongst many. See specific classes for information on additional parameters and values specific to that class.

See RFC2426 for more details on pre-defined parameter names and values.

## Since:

0.6.0

All known sub-classes:

- EmailFieldDetails
- ExtendedFieldDetails
- ImFieldDetails

- NoteFieldDetails
- PhoneFieldDetails
- PostalAddressFieldDetails

- RoleFieldDetails
- UrlFieldDetails
- WebServiceFieldDetails

Namespace: Folks
Package: folks

## Content:

### Constants:

- public const string PARAM_TYPE
  Parameter name for classifying the type of value this field contains.
- public const string PARAM_TYPE_HOME
  Parameter value for home-related field values.
- public const string PARAM_TYPE_OTHER
  Parameter value for miscellaneous field values.
- public const string PARAM_TYPE_WORK
  Parameter value for work-related field values.

### Properties:

- public virtual string id { get; set; }
  A unique ID (if any) for this specific detail.
- public virtual MultiMap<string,string> parameters { get; set construct; }
  The parameters associated with the value.
- public virtual T value { get; set construct; }
  The value of the field.
- public Type value_type { get; }
  The GLib.Type of the AbstractFieldDetails.value.

### Static methods:

- public static bool equal_static (AbstractFieldDetails left, AbstractFieldDetails right)
  Same as AbstractFieldDetails.equal, but static, so we can use libgee 0.8 without an API break.
- public static uint hash_static (AbstractFieldDetails value)
  Same as AbstractFieldDetails.hash, but static, so we can use libgee 0.8 without an API break.

### Methods:

- public void add_parameter (string parameter_name, string parameter_value)
  Add a new value for a parameter.
- public virtual bool equal (AbstractFieldDetails<T> that)
  A fairly-strict equality function for AbstractFieldDetails.
- public void extend_parameters (MultiMap<string,string> additional)
  Extend the existing parameters.
- public Collection<string>? get_parameter_values (string parameter_name)
  Get the values for a parameter
- public virtual uint hash ()
  A hash function for the AbstractFieldDetails.
- public virtual bool parameters_equal (AbstractFieldDetails<T> that)
  An equality function which only considers parameters.
- public void remove_parameter_all (string parameter_name)
  Remove all instances of a parameter.
- public void set_parameter (string parameter_name, string parameter_value)
  Set the value of a parameter.
- public virtual bool values_equal (AbstractFieldDetails<T> that)
  An equality function which does not consider parameters.

### Inherited Members:

All known members inherited from class GLib.Object

- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data

- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer

- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref