GDataCalendarQuery

## GDataCalendarQuery GDataCalendarQuery — GData Calendar query object |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <gdata/services/calendar/gdata-calendar-query.h>

                        GDataCalendarQuery;
                        GDataCalendarQueryClass;
    GDataCalendarQuery * gdata_calendar_query_new           (const gchar *q);
    GDataCalendarQuery * gdata_calendar_query_new_with_limits
                                                            (const gchar *q,
                                                             GTimeVal *start_min,
                                                             GTimeVal *start_max);
    gboolean            gdata_calendar_query_get_future_events
                                                            (GDataCalendarQuery *self);
    void                gdata_calendar_query_set_future_events
                                                            (GDataCalendarQuery *self,
                                                             gboolean future_events);
    gboolean            gdata_calendar_query_get_single_events
                                                            (GDataCalendarQuery *self);
    void                gdata_calendar_query_set_single_events
                                                            (GDataCalendarQuery *self,
                                                             gboolean single_events);
    const gchar *       gdata_calendar_query_get_order_by   (GDataCalendarQuery *self);
    void                gdata_calendar_query_set_order_by   (GDataCalendarQuery *self,
                                                             const gchar *order_by);
    const gchar *       gdata_calendar_query_get_sort_order (GDataCalendarQuery *self);
    void                gdata_calendar_query_set_sort_order (GDataCalendarQuery *self,
                                                             const gchar *sort_order);
    void                gdata_calendar_query_get_start_min  (GDataCalendarQuery *self,
                                                             GTimeVal *start_min);
    void                gdata_calendar_query_set_start_min  (GDataCalendarQuery *self,
                                                             GTimeVal *start_min);
    void                gdata_calendar_query_get_start_max  (GDataCalendarQuery *self,
                                                             GTimeVal *start_max);
    void                gdata_calendar_query_set_start_max  (GDataCalendarQuery *self,
                                                             GTimeVal *start_max);
    void                gdata_calendar_query_get_recurrence_expansion_start
                                                            (GDataCalendarQuery *self,
                                                             GTimeVal *start);
    void                gdata_calendar_query_set_recurrence_expansion_start
                                                            (GDataCalendarQuery *self,
                                                             GTimeVal *start);
    void                gdata_calendar_query_get_recurrence_expansion_end
                                                            (GDataCalendarQuery *self,
                                                             GTimeVal *end);
    void                gdata_calendar_query_set_recurrence_expansion_end
                                                            (GDataCalendarQuery *self,
                                                             GTimeVal *end);
    const gchar *       gdata_calendar_query_get_timezone   (GDataCalendarQuery *self);
    void                gdata_calendar_query_set_timezone   (GDataCalendarQuery *self,
                                                             const gchar *_timezone);

## Object Hierarchy

      GObject
       +----GDataQuery
             +----GDataCalendarQuery

## Properties

      "future-events"            gboolean              : Read / Write
      "order-by"                 gchar*                : Read / Write
      "recurrence-expansion-end" GDataTimeVal*         : Read / Write
      "recurrence-expansion-start" GDataTimeVal*         : Read / Write
      "single-events"            gboolean              : Read / Write
      "sort-order"               gchar*                : Read / Write
      "start-max"                GDataTimeVal*         : Read / Write
      "start-min"                GDataTimeVal*         : Read / Write
      "timezone"                 gchar*                : Read / Write

## Description

GDataCalendarQuery represents a collection of query parameters specific to the Google Calendar service, which go above and beyond those catered for by GDataQuery.

For more information on the custom GData query parameters supported by GDataCalendarQuery, see the online documentation.

## Details

### GDataCalendarQuery

    typedef struct _GDataCalendarQuery GDataCalendarQuery;

All the fields in the GDataCalendarQuery structure are private and should never be accessed directly.

### GDataCalendarQueryClass

    typedef struct {
    } GDataCalendarQueryClass;

All the fields in the GDataCalendarQueryClass structure are private and should never be accessed directly.

### gdata_calendar_query_new ()

    GDataCalendarQuery * gdata_calendar_query_new           (const gchar *q);

Creates a new GDataCalendarQuery with its "q" property set to `q`.

`q` : | a query string, or `NULL`. [allow-none]
Returns : | a new GDataCalendarQuery

### gdata_calendar_query_new_with_limits ()

    GDataCalendarQuery * gdata_calendar_query_new_with_limits
                                                            (const gchar *q,
                                                             GTimeVal *start_min,
                                                             GTimeVal *start_max);

Creates a new GDataCalendarQuery with its "q" property set to `q`, and the time limits `start_min` and `start_max` applied.

`q` : | a query string, or `NULL`. [allow-none]
`start_min` : | a starting time for the event period, or `NULL`. [allow-none]
`start_max` : | an ending time for the event period, or `NULL`. [allow-none]
Returns : | a new GDataCalendarQuery

### gdata_calendar_query_get_future_events ()

    gboolean            gdata_calendar_query_get_future_events
                                                            (GDataCalendarQuery *self);

Gets the "future-events" property.

`self` : | a GDataCalendarQuery
Returns : | the future events property

### gdata_calendar_query_set_future_events ()

    void                gdata_calendar_query_set_future_events
                                                            (GDataCalendarQuery *self,
                                                             gboolean future_events);

Sets the "future-events" property of the GDataCalendarQuery to `future_events`.

`self` : | a GDataCalendarQuery
`future_events` : | `TRUE` to unconditionally show future events, `FALSE` otherwise

### gdata_calendar_query_get_single_events ()

    gboolean            gdata_calendar_query_get_single_events
                                                            (GDataCalendarQuery *self);

Gets the "single-events" property.

`self` : | a GDataCalendarQuery
Returns : | the single events property

### gdata_calendar_query_set_single_events ()

    void                gdata_calendar_query_set_single_events
                                                            (GDataCalendarQuery *self,
                                                             gboolean single_events);

Sets the "single-events" property of the GDataCalendarQuery to `single_events`.

`self` : | a GDataCalendarQuery
`single_events` : | `TRUE` to show recurring events as single events, `FALSE` otherwise

### gdata_calendar_query_get_order_by ()

    const gchar *       gdata_calendar_query_get_order_by   (GDataCalendarQuery *self);

Gets the "order-by" property.

`self` : | a GDataCalendarQuery
Returns : | the order by property, or `NULL` if it is unset

### gdata_calendar_query_set_order_by ()

    void                gdata_calendar_query_set_order_by   (GDataCalendarQuery *self,
                                                             const gchar *order_by);

Sets the "order-by" property of the GDataCalendarQuery to the new order by string, `order_by`.

Set `order_by` to `NULL` to unset the property in the query URI.

`self` : | a GDataCalendarQuery
`order_by` : | a new order by string, or `NULL`. [allow-none]

### gdata_calendar_query_get_sort_order ()

    const gchar *       gdata_calendar_query_get_sort_order (GDataCalendarQuery *self);

Gets the "sort-order" property.

`self` : | a GDataCalendarQuery
Returns : | the sort order property, or `NULL` if it is unset

### gdata_calendar_query_set_sort_order ()

    void                gdata_calendar_query_set_sort_order (GDataCalendarQuery *self,
                                                             const gchar *sort_order);

Sets the "sort-order" property of the GDataCalendarQuery to the new sort order string, `sort_order`.

Set `sort_order` to `NULL` to unset the property in the query URI.

`self` : | a GDataCalendarQuery
`sort_order` : | a new sort order string, or `NULL`. [allow-none]

### gdata_calendar_query_get_start_min ()

    void                gdata_calendar_query_get_start_min  (GDataCalendarQuery *self,
                                                             GTimeVal *start_min);

Gets the "start-min" property and puts it in `start_min`. If the property is unset, both fields in the GTimeVal will be set to `0`.

`self` : | a GDataCalendarQuery
`start_min` : | a GTimeVal. [out caller-allocates]

### gdata_calendar_query_set_start_min ()

    void                gdata_calendar_query_set_start_min  (GDataCalendarQuery *self,
                                                             GTimeVal *start_min);

Sets the "start-min" property of the GDataCalendarQuery to the new time/date, `start_min`.

Set `start_min` to `NULL` to unset the property in the query URI.

`self` : | a GDataCalendarQuery
`start_min` : | a new minimum start time, or `NULL`. [allow-none]

### gdata_calendar_query_get_start_max ()

    void                gdata_calendar_query_get_start_max  (GDataCalendarQuery *self,
                                                             GTimeVal *start_max);

Gets the "start-max" property and puts it in `start_max`. If the property is unset, both fields in the GTimeVal will be set to `0`.

`self` : | a GDataCalendarQuery
`start_max` : | a GTimeVal. [out caller-allocates]

### gdata_calendar_query_set_start_max ()

    void                gdata_calendar_query_set_start_max  (GDataCalendarQuery *self,
                                                             GTimeVal *start_max);

Sets the "start-max" property of the GDataCalendarQuery to the new time/date, `start_max`.

Set `start_max` to `NULL` to unset the property in the query URI.

`self` : | a GDataCalendarQuery
`start_max` : | a new maximum start time, or `NULL`. [allow-none]

### gdata_calendar_query_get_recurrence_expansion_start ()

    void                gdata_calendar_query_get_recurrence_expansion_start
                                                            (GDataCalendarQuery *self,
                                                             GTimeVal *start);

Gets the "recurrence-expansion-start" property and puts it in `start`. If the property is unset, both fields in the GTimeVal will be set to `0`.

`self` : | a GDataCalendarQuery
`start` : | a GTimeVal. [out caller-allocates]

### gdata_calendar_query_set_recurrence_expansion_start ()

    void                gdata_calendar_query_set_recurrence_expansion_start
                                                            (GDataCalendarQuery *self,
                                                             GTimeVal *start);

Sets the "recurrence-expansion-start" property of the GDataCalendarQuery to the new time/date, `start`.

Set `start` to `NULL` to unset the property in the query URI.

`self` : | a GDataCalendarQuery
`start` : | a new start time, or `NULL`. [allow-none]

### gdata_calendar_query_get_recurrence_expansion_end ()

    void                gdata_calendar_query_get_recurrence_expansion_end
                                                            (GDataCalendarQuery *self,
                                                             GTimeVal *end);

Gets the "recurrence-expansion-end" property and puts it in `end`. If the property is unset, both fields in the GTimeVal will be set to `0`.

`self` : | a GDataCalendarQuery
`end` : | a GTimeVal. [out caller-allocates]

### gdata_calendar_query_set_recurrence_expansion_end ()

    void                gdata_calendar_query_set_recurrence_expansion_end
                                                            (GDataCalendarQuery *self,
                                                             GTimeVal *end);

Sets the "recurrence-expansion-end" property of the GDataCalendarQuery to the new time/date, `end`.

Set `end` to `NULL` to unset the property in the query URI.

`self` : | a GDataCalendarQuery
`end` : | a new end time, or `NULL`. [allow-none]

### gdata_calendar_query_get_timezone ()

    const gchar *       gdata_calendar_query_get_timezone   (GDataCalendarQuery *self);

Gets the "timezone" property.

`self` : | a GDataCalendarQuery
Returns : | the timezone property, or `NULL` if it is unset

Since 0.2.0

### gdata_calendar_query_set_timezone ()

    void                gdata_calendar_query_set_timezone   (GDataCalendarQuery *self,
                                                             const gchar *_timezone);

Sets the "timezone" property of the GDataCalendarQuery to the new timezone string, `timezone`.

Set `timezone` to `NULL` to unset the property in the query URI.

`self` : | a GDataCalendarQuery
`_timezone` : | a new timezone string, or `NULL`. [allow-none]

Since 0.2.0

## Property Details

### The `"future-events"` property

      "future-events"            gboolean              : Read / Write

A shortcut to request all events that are scheduled for future times. Overrides the "recurrence-expansion-start", "recurrence-expansion-end", "start-min" and "start-max" properties.

Default value: FALSE

### The `"order-by"` property

      "order-by"                 gchar*                : Read / Write

Specifies order of entries in a feed. Supported values are `lastmodified` and `starttime`.

Default value: NULL

### The `"recurrence-expansion-end"` property

      "recurrence-expansion-end" GDataTimeVal*         : Read / Write

Specifies end of time period for which to expand recurring events, exclusive.

### The `"recurrence-expansion-start"` property

      "recurrence-expansion-start" GDataTimeVal*         : Read / Write

Specifies beginning of time period for which to expand recurring events, inclusive.

### The `"single-events"` property

      "single-events"            gboolean              : Read / Write

Indicates whether recurring events should be expanded or represented as a single event.

Default value: FALSE

### The `"sort-order"` property

      "sort-order"               gchar*                : Read / Write

Specifies direction of sorting. Supported values are `ascending` and `descending`.

Default value: NULL

### The `"start-max"` property

      "start-max"                GDataTimeVal*         : Read / Write

Together with "start-min" creates a timespan such that only events that are within the timespan are returned

"start-min" is inclusive, while "start-max" is exclusive. Events that overlap the range are included.

If not specified, the default "start-max" is `2031-01-01`.

### The `"start-min"` property

      "start-min"                GDataTimeVal*         : Read / Write

Together with "start-max" creates a timespan such that only events that are within the timespan are returned.

"start-min" is inclusive, while "start-max" is exclusive. Events that overlap the range are included.

If not specified, the default "start-min" is `1970-01-01`.

### The `"timezone"` property

      "timezone"                 gchar*                : Read / Write

The current timezone. If not specified, times are returned in UTC.

Default value: NULL

Since 0.2.0