Detailed Description
Possible dispositions for insert, extract and delete function(s). Not all of these dispositions are implemented day one. If disposition is not implemented the function will return error ENOSYS.
Other dispositions might be possible in future.
Define Documentation
After the given property.
For "insert":
- Add property immediately the referenced property.
For "extract" or "delete":
- Extract or delete the property that stands after the referenced property in the collection. If given property is the last in the collection ENOENT is returned.
Before the given property.
For "insert":
- Add property before the referenced property.
For "extract" or "delete":
- Extract or delete the property that stands before the referenced property in the collection. If given property is the first in the collection ENOENT is returned.
Relate to the end of the collection.
For "insert":
- Add property to the end of the collection.
For "extract" or "delete":
- Extract or delete the last property in the collection.
#define COL_DSP_FIRSTDUP 5 |
Use first among duplicates.
This mode applies only to the list of duplicate properties that are going one after another.
For "insert":
- Add property as a first dup of the given property. The property name is taken from the item and the value refprop is ignored.
For "extract" or "delete":
- Delete or extract first duplicate property. The property name is taken from the refprop. The property will be extracted or deleted if found regardless of whether there are any duplicates or not.
Relate to the beginning of the collection.
For "insert":
- Add property to the beginning of the collection right after the header.
For "extract" or "delete":
- Extract or delete the first property in the collection. This is the one right after the header.
Use index.
For "insert":
- The COL_DSP_INDEX adds the item as N-th item after header in the list. Index is zero based. If there are less than N items in the list the item is added to the end. The index value of 0 means that the item will be added immediately after the header. Index of 1 will mean that it is added after first data item and so on.
For "extract" or "delete":
- In case of extraction or deletion the N-th item of the collection will be extracted or deleted. Index is zero based. If there are less than N+1 items in the list the function will return ENOENT.
#define COL_DSP_LASTDUP 6 |
Use last among duplicates.
This mode applies only to the list of duplicate properties that are going one after another.
For "insert":
- Add property as the last dup of the given property. The property name is taken from the item and the value refprop is ignored.
For "extract" or "delete":
- Delete or extract the last duplicate of the property. The property name is taken from the refprop. Extracts or deletes last duplicate property in the uninterrupted sequence of properties with the same name. The property will be extracted or deleted if found regardless of whether there are any duplicates or not.
Use N-th among duplicates.
This mode applies only to the list of duplicate properties that are going one after another.
For "insert":
- Add property as a N-th dup of the given property. The property name is taken from the item and the value refprop is ignored. Index is zero based. The COL_DSP_NDUP is used in case of the multi value property to add a new property with the same name into specific place in the list of properties with the same name. The index of 0 will mean to add the property before the first instance of the property with the same name. If the property does not exist ENOENT will be returned. If the index is greater than the last property with the same name the item will be added immediately after last property with the same name.
For "extract" or "delete":
- Delete or extract N-th duplicate property. Index is zero based. The property name is taken from the refprop. If index is greater than number of duplicate properties in the sequence ENOENT is returned.