diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-06-09 15:04:09 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-06-09 15:04:09 +0800 |
commit | 943862dd20ad79007900192fec5c705e9748542a (patch) | |
tree | 01330a057de763ae84f14e8ce004928d835012f1 /calendar/pcs/cal-backend.c | |
parent | 95ebc1fc92ebe028654b8842bc9d7e5174a0090e (diff) | |
download | gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.gz gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.bz2 gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.lz gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.xz gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.zst gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.zip |
Added a get_n_objects() method.
2000-06-09 Federico Mena Quintero <federico@helixcode.com>
* idl/evolution-calendar.idl (Cal): Added a get_n_objects()
method.
* pcs/cal-backend.c (cal_backend_get_n_objects): New function.
* pcs/cal-backend-imc.c (cal_backend_imc_get_n_objects):
Implemented.
* pcs/cal.c (Cal_get_n_objects): Implemented.
* cal-client/cal-client.c (cal_client_get_uids): Free the ev.
(cal_client_get_n_objects): Implemented.
* cal-util/calobj.h (iCalObjectField): New enumeration to identify
the fields in an iCalObject.
svn path=/trunk/; revision=3486
Diffstat (limited to 'calendar/pcs/cal-backend.c')
-rw-r--r-- | calendar/pcs/cal-backend.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 15cfb1e7bc..7956f77473 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -177,6 +177,25 @@ cal_backend_create (CalBackend *backend, GnomeVFSURI *uri) } /** + * cal_backend_get_n_objects: + * @backend: A calendar backend. + * @type: Types of objects that will be included in the count. + * + * Queries the number of calendar objects of a particular type. + * + * Return value: Number of objects of the specified @type. + **/ +int +cal_backend_get_n_objects (CalBackend *backend, CalObjType type) +{ + g_return_val_if_fail (backend != NULL, -1); + g_return_val_if_fail (IS_CAL_BACKEND (backend), -1); + + g_assert (CLASS (backend)->get_n_objects != NULL); + return (* CLASS (backend)->get_n_objects) (backend, type); +} + +/** * cal_backend_get_object: * @backend: A calendar backend. * @uid: Unique identifier for a calendar object. |