OsinfoProductFilter: Libosinfo Reference Manual

## OsinfoProductFilter OsinfoProductFilter — an operating system filter |

## Functions

OsinfoProductFilter * | osinfo_productfilter_new ()
gint | osinfo_productfilter_add_product_constraint ()
void | osinfo_productfilter_clear_product_constraint ()
void | osinfo_productfilter_clear_product_constraints ()
GList * | osinfo_productfilter_get_product_constraint_values ()
void | osinfo_productfilter_add_support_date_constraint ()

## Object Hierarchy

        GObject
        ╰── OsinfoFilter
            ╰── OsinfoProductFilter

## Description

OsinfoProductFilter is a specialization of OsinfoFilter that can also set constraints against operating system relationships. It can only be used to filter entities that are OsinfoProduct objects.

## Functions

### osinfo_productfilter_new ()

    OsinfoProductFilter *
    osinfo_productfilter_new (void);

Construct a new filter that matches all operating systems

#### Returns

a new filter.

[transfer full]

### osinfo_productfilter_add_product_constraint ()

    gint
    osinfo_productfilter_add_product_constraint
                                   (OsinfoProductFilter *productfilter,
                                    OsinfoProductRelationship relshp,
                                    OsinfoProduct *product);

Adds a constraint that matches products which have a relationship `relshp` with `product` . Multiple constraints can be set for the same `relshp` or `product` , in which case all must match

#### Parameters

productfilter | a filter object |
relshp | the relationship to filter on |
product | the target product to filter on. | [transfer none]

### osinfo_productfilter_clear_product_constraint ()

    void
    osinfo_productfilter_clear_product_constraint
                                   (OsinfoProductFilter *productfilter,
                                    OsinfoProductRelationship relshp);

Remove all constraints for the relationship `relshp`

#### Parameters

productfilter | a filter object |
relshp | the relationship to clear |

### osinfo_productfilter_clear_product_constraints ()

    void
    osinfo_productfilter_clear_product_constraints
                                   (OsinfoProductFilter *productfilter);

Remove all relationship constraints

#### Parameters

productfilter | a filter object |

### osinfo_productfilter_get_product_constraint_values ()

    GList *
    osinfo_productfilter_get_product_constraint_values
                                   (OsinfoProductFilter *productfilter,
                                    OsinfoProductRelationship relshp);

Retrieve a list of all operating systems that are the target of constraint for the relationship `relshp` .

#### Parameters

productfilter | a filter object |
relshp | a relationship to query |

#### Returns

a list of operating systems.

[transfer container][element-type OsinfoProduct]

### osinfo_productfilter_add_support_date_constraint ()

    void
    osinfo_productfilter_add_support_date_constraint
                                   (OsinfoProductFilter *productfilter,
                                    GDate *when);

## See Also

OsinfoFilter, OsinfoProduct