Top |
FolksAbstractFieldDetailsFolksAbstractFieldDetails — Object representing any type of value that can have some vCard-like parameters associated with it. |
gchar * | id | Read / Write |
GeeMultiMap * | parameters | Read / Write / Construct |
gpointer | t-destroy-func | Write / Construct Only |
gpointer | t-dup-func | Write / Construct Only |
GType * | t-type | Write / Construct Only |
gpointer | value | Read / Write / Construct |
GType * | value-type | Read |
GObject ╰── FolksAbstractFieldDetails ├── FolksEmailFieldDetails ├── FolksImFieldDetails ├── FolksNoteFieldDetails ├── FolksPhoneFieldDetails ├── FolksPostalAddressFieldDetails ├── FolksRoleFieldDetails ├── FolksUrlFieldDetails ╰── FolksWebServiceFieldDetails
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 "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.
#define FOLKS_TYPE_ABSTRACT_FIELD_DETAILS (folks_abstract_field_details_get_type ())
The type for FolksAbstractFieldDetails.
GeeCollection * folks_abstract_field_details_get_parameter_values (FolksAbstractFieldDetails *self
,const gchar *parameter_name
);
Get the values for a parameter
a collection of values for parameter_name
or null
(i.e. no collection) if there are no such parameters.
Since 0.6.0
void folks_abstract_field_details_add_parameter (FolksAbstractFieldDetails *self
,const gchar *parameter_name
,const gchar *parameter_value
);
Add a new value for a parameter.
If there is already a parameter called parameter_name
then parameter_value
is added to the existing ones.
self |
the FolksAbstractFieldDetails instance |
|
parameter_name |
. the name of the parameter . |
[in] |
parameter_value |
. the value to add . |
[in] |
Since 0.6.0
void folks_abstract_field_details_set_parameter (FolksAbstractFieldDetails *self
,const gchar *parameter_name
,const gchar *parameter_value
);
Set the value of a parameter.
Sets the parameter called parameter_name
to be parameter_value
. If there were already parameters with the same name they are replaced.
self |
the FolksAbstractFieldDetails instance |
|
parameter_name |
. the name of the parameter . |
[in] |
parameter_value |
. the value to add . |
[in] |
Since 0.6.0
void folks_abstract_field_details_extend_parameters (FolksAbstractFieldDetails *self
,GeeMultiMap *additional
);
Extend the existing parameters.
Merge the parameters from additional
into the existing ones.
Since 0.6.0
void folks_abstract_field_details_remove_parameter_all (FolksAbstractFieldDetails *self
,const gchar *parameter_name
);
Remove all instances of a parameter.
self |
the FolksAbstractFieldDetails instance |
|
parameter_name |
. the name of the parameter . |
[in] |
Since 0.6.0
gboolean folks_abstract_field_details_equal (FolksAbstractFieldDetails *self
,FolksAbstractFieldDetails *that
);
A fairly-strict equality function for FolksAbstractFieldDetails.
This function compares:
And does not compare:
"id"s
See the description of folks_abstract_field_details_values_equal()
for details on the value comparison.
To check equality not including the parameters, see folks_abstract_field_details_values_equal()
.
See also: folks_abstract_field_details_parameters_equal()
, folks_abstract_field_details_values_equal()
self |
the FolksAbstractFieldDetails instance |
|
that |
. another FolksAbstractFieldDetails . |
[in] |
Since 0.6.0
gboolean folks_abstract_field_details_parameters_equal (FolksAbstractFieldDetails *self
,FolksAbstractFieldDetails *that
);
An equality function which only considers parameters.
This function compares:
And does not compare:
See also: folks_abstract_field_details_equal()
, folks_abstract_field_details_values_equal()
self |
the FolksAbstractFieldDetails instance |
|
that |
. another FolksAbstractFieldDetails . |
[in] |
Since 0.6.5
gboolean folks_abstract_field_details_values_equal (FolksAbstractFieldDetails *self
,FolksAbstractFieldDetails *that
);
An equality function which does not consider parameters.
Specific classes may override this function to provide "smart" value comparisons (eg, considering the phone number values "+1 555 123 4567" and "123-4567" equal). If you wish to do strict comparisons, simply compare the "value"s directly.
This function compares:
And does not compare:
This defaults to string comparison of the "value"s if the generic type is string; otherwise, direct pointer comparison of the "value"s.
See also: folks_abstract_field_details_equal()
, folks_abstract_field_details_parameters_equal()
self |
the FolksAbstractFieldDetails instance |
|
that |
. another FolksAbstractFieldDetails . |
[in] |
Since 0.6.5
guint
folks_abstract_field_details_hash (FolksAbstractFieldDetails *self
);
A hash function for the FolksAbstractFieldDetails.
This defaults to a string hash of the "value" if the generic type is string; otherwise, direct hash of the "value".
Since 0.6.0
gconstpointer
folks_abstract_field_details_get_value
(FolksAbstractFieldDetails *self
);
Get and return the current value of the "value" property.
The value of the field.
The value of the field, the exact type and content of which depends on what the structure is used for.
Since 0.6.0
void folks_abstract_field_details_set_value (FolksAbstractFieldDetails *self
,gconstpointer value
);
Set the value of the "value" property to value
.
The value of the field.
The value of the field, the exact type and content of which depends on what the structure is used for.
Since 0.6.0
GType
folks_abstract_field_details_get_value_type
(FolksAbstractFieldDetails *self
);
Get and return the current value of the "value-type" property.
This is particularly useful for treating collections of different types of FolksAbstractFieldDetails in a uniform way without needing to name them explicitly.
Since 0.6.5
const gchar *
folks_abstract_field_details_get_id (FolksAbstractFieldDetails *self
);
Get and return the current value of the "id" property.
A unique ID (if any) for this specific detail.
This is primarily intended for FolksPersonaStores which need to track specific instances of details (because their backing store is wacky).
In most cases, this will be an empty string.
The content of this is opaque to all but the package which set it.
Since 0.6.5
void folks_abstract_field_details_set_id (FolksAbstractFieldDetails *self
,const gchar *value
);
Set the value of the "id" property to value
.
A unique ID (if any) for this specific detail.
This is primarily intended for FolksPersonaStores which need to track specific instances of details (because their backing store is wacky).
In most cases, this will be an empty string.
The content of this is opaque to all but the package which set it.
self |
the FolksAbstractFieldDetails instance to modify |
|
value |
the new value of the "id" property |
Since 0.6.5
GeeMultiMap *
folks_abstract_field_details_get_parameters
(FolksAbstractFieldDetails *self
);
Get and return the current value of the "parameters" property.
The parameters associated with the value.
A multi-map of the parameters associated with "value". The keys are the names of the parameters, while the values are a list of strings.
Since 0.6.0
void folks_abstract_field_details_set_parameters (FolksAbstractFieldDetails *self
,GeeMultiMap *value
);
Set the value of the "parameters" property to value
.
The parameters associated with the value.
A multi-map of the parameters associated with "value". The keys are the names of the parameters, while the values are a list of strings.
self |
the FolksAbstractFieldDetails instance to modify |
|
value |
the new value of the "parameters" property |
Since 0.6.0
gboolean folks_abstract_field_details_equal_static (FolksAbstractFieldDetails *left
,FolksAbstractFieldDetails *right
);
Same as folks_abstract_field_details_equal()
, but static, so we can use libgee 0.8 without an API break.
See 673918 This can and should be removed next time we break the API. Note: This uses Gee.EqualDataFunc signature, to avoid having to cast.
left |
. one FolksAbstractFieldDetails to compare . |
[in] |
right |
. another FolksAbstractFieldDetails to compare . |
[in] |
Since 0.9.0
guint
folks_abstract_field_details_hash_static
(FolksAbstractFieldDetails *value
);
Same as folks_abstract_field_details_hash()
, but static, so we can use libgee 0.8 without an API break.
See 673918 This can and should be removed next time we break the API. Note: This uses Gee.HashDataFunc signature, to avoid having to cast.
Since 0.9.0
#define FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE "type"
Parameter name for classifying the type of value this field contains.
For example, the value could be relevant to the contact's home life, or to their work life; values of FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE_HOME
and FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE_WORK
would be used for the FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE
parameter, respectively, in those cases.
Since 0.6.3
#define FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE_HOME "home"
Parameter value for home-related field values.
Value for a parameter with name FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE
.
Since 0.6.3
#define FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE_WORK "work"
Parameter value for work-related field values.
Value for a parameter with name FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE
.
Since 0.6.3
#define FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE_OTHER "other"
Parameter value for miscellaneous field values.
Value for a parameter with name FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE
.
Since 0.6.3
struct FolksAbstractFieldDetails;
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 "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
struct FolksAbstractFieldDetailsClass { GObjectClass parent_class; gboolean (*equal) (FolksAbstractFieldDetails* self, FolksAbstractFieldDetails* that); gboolean (*parameters_equal) (FolksAbstractFieldDetails* self, FolksAbstractFieldDetails* that); gboolean (*values_equal) (FolksAbstractFieldDetails* self, FolksAbstractFieldDetails* that); guint (*hash) (FolksAbstractFieldDetails* self); gconstpointer (*get_value) (FolksAbstractFieldDetails* self); void (*set_value) (FolksAbstractFieldDetails* self, gconstpointer value); const gchar* (*get_id) (FolksAbstractFieldDetails* self); void (*set_id) (FolksAbstractFieldDetails* self, const gchar* value); GeeMultiMap* (*get_parameters) (FolksAbstractFieldDetails* self); void (*set_parameters) (FolksAbstractFieldDetails* self, GeeMultiMap* value); };
The class structure for FOLKS_TYPE_ABSTRACT_FIELD_DETAILS
. All the fields in this structure are private and should never be accessed directly.
GObjectClass |
the parent class structure |
|
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
getter method for the abstract property "value" |
||
getter method for the abstract property "id" |
||
setter method for the abstract property "id" |
||
getter method for the abstract property "parameters" |
||
“id”
property“id” gchar *
A unique ID (if any) for this specific detail.
This is primarily intended for FolksPersonaStores which need to track specific instances of details (because their backing store is wacky).
In most cases, this will be an empty string.
The content of this is opaque to all but the package which set it.
Flags: Read / Write
Default value: NULL
Since 0.6.5
“parameters”
property “parameters” GeeMultiMap *
The parameters associated with the value.
A multi-map of the parameters associated with "value". The keys are the names of the parameters, while the values are a list of strings.
Flags: Read / Write / Construct
Since 0.6.0
“value”
property“value” gpointer
The value of the field.
Holds a value from type “t-type”.
.The value of the field, the exact type and content of which depends on what the structure is used for.
Flags: Read / Write / Construct
Since 0.6.0
“value-type”
property“value-type” GType *
This is particularly useful for treating collections of different types of FolksAbstractFieldDetails in a uniform way without needing to name them explicitly.
Flags: Read
Allowed values: void
Since 0.6.5