From: JP Rosevear Date: Tue, 11 Nov 2003 01:34:46 +0000 (+0000) Subject: mark struct as private X-Git-Tag: upstream/3.7.4~9740 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b9e118995e41353befae1b6bf3fa00dc2628fba;p=platform%2Fupstream%2Fevolution-data-server.git mark struct as private 2003-11-10 JP Rosevear * libecal/e-cal.h: mark struct as private * libecal/e-cal.c: fix documentation headers * libecal/e-cal-view.h: fix cast macros and typedef the structs separately * libecal/e-cal-view.c: use correct type check macro, fix some documentation headers * libecal/e-cal-view-listener.h: typedef the structs separately and tidy up class macros * libecal/e-cal-util.c: fix a documentation header * libecal/e-cal-listener.h: mark parts of the struct as private * libecal/e-cal-listener.c: fix a few documentation headers * libecal/e-cal-component.h: remove extraneous comma and mark parts of struct as private * libecal/e-cal-component.c: fix a couple of documentation headers --- diff --git a/calendar/ChangeLog b/calendar/ChangeLog index a569af2..f6bfc04 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,29 @@ +2003-11-10 JP Rosevear + + * libecal/e-cal.h: mark struct as private + + * libecal/e-cal.c: fix documentation headers + + * libecal/e-cal-view.h: fix cast macros and typedef the structs + separately + + * libecal/e-cal-view.c: use correct type check macro, fix some + documentation headers + + * libecal/e-cal-view-listener.h: typedef the structs separately + and tidy up class macros + + * libecal/e-cal-util.c: fix a documentation header + + * libecal/e-cal-listener.h: mark parts of the struct as private + + * libecal/e-cal-listener.c: fix a few documentation headers + + * libecal/e-cal-component.h: remove extraneous comma and mark + parts of struct as private + + * libecal/e-cal-component.c: fix a couple of documentation headers + 2003-11-10 Dan Winship * libedata-cal/e-cal-backend-sexp.c: Remove get-vtype from the diff --git a/calendar/libecal/e-cal-component.c b/calendar/libecal/e-cal-component.c index 65445b0..b29e102 100644 --- a/calendar/libecal/e-cal-component.c +++ b/calendar/libecal/e-cal-component.c @@ -4197,9 +4197,9 @@ e_cal_component_has_attendees (ECalComponent *comp) /** * e_cal_component_get_location: - * @comp: A calendar component object. - * @url: Return value for the location. - * + * @comp: A calendar component object + * @location: Return value for the location. + * * Queries the location property of a calendar component object. **/ void @@ -4223,8 +4223,8 @@ e_cal_component_get_location (ECalComponent *comp, const char **location) /** * e_cal_component_set_location: * @comp: A calendar component object. - * @url: Location value. - * + * @location: Location value. + * * Sets the location property of a calendar component object. **/ void diff --git a/calendar/libecal/e-cal-component.h b/calendar/libecal/e-cal-component.h index 52d17dc..7ef7118 100644 --- a/calendar/libecal/e-cal-component.h +++ b/calendar/libecal/e-cal-component.h @@ -78,9 +78,7 @@ typedef enum { E_CAL_COMPONENT_FIELD_COLOR, /* not a real field */ E_CAL_COMPONENT_FIELD_STATUS, E_CAL_COMPONENT_FIELD_COMPONENT, /* not a real field */ -#if 0 E_CAL_COMPONENT_FIELD_LOCATION, -#endif E_CAL_COMPONENT_FIELD_NUM_FIELDS } ECalComponentField; @@ -126,7 +124,7 @@ typedef struct { typedef enum { E_CAL_COMPONENT_RANGE_SINGLE, E_CAL_COMPONENT_RANGE_THISPRIOR, - E_CAL_COMPONENT_RANGE_THISFUTURE, + E_CAL_COMPONENT_RANGE_THISFUTURE } ECalComponentRangeType; typedef struct { @@ -186,7 +184,7 @@ typedef struct _ECalComponentPrivate ECalComponentPrivate; struct _ECalComponent { GObject object; - /* Private data */ + /*< private >*/ ECalComponentPrivate *priv; }; diff --git a/calendar/libecal/e-cal-listener.c b/calendar/libecal/e-cal-listener.c index e06779d..51a91b3 100644 --- a/calendar/libecal/e-cal-listener.c +++ b/calendar/libecal/e-cal-listener.c @@ -923,24 +923,6 @@ BONOBO_TYPE_FUNC_FULL (ECalListener, BONOBO_TYPE_OBJECT, e_cal_listener); -/** - * e_cal_listener_construct: - * @listener: A calendar listener. - * @cal_opened_fn: Function that will be called to notify that a calendar was - * opened. - * @cal_removed_fn: Function that will be called to notify that a calendar was - * removed - * @error_occurred_fn: Function that will be called to notify errors. - * @categories_changed_fn: Function that will be called to notify that the list - * of categories that are present in the calendar's objects has changed. - * @fn_data: Closure data pointer that will be passed to the notification - * functions. - * - * Constructs a calendar listener by setting the callbacks that it will use for - * notification from the calendar server. - * - * Return value: the same object as the @listener argument. - **/ ECalListener * e_cal_listener_construct (ECalListener *listener, ECalListenerCalSetModeFn cal_set_mode_fn, @@ -968,14 +950,14 @@ e_cal_listener_construct (ECalListener *listener, /** * e_cal_listener_new: - * @cal_opened_fn: Function that will be called to notify that a calendar was - * opened. - * @error_occurred_fn: Function that will be called to notify errors. + * @cal_set_mode_fn: Function callback for notification that a + * calendar changed modes + * @error_occurred_fn: Function that will be called to notify errors. * @categories_changed_fn: Function that will be called to notify that the list * of categories that are present in the calendar's objects has changed. - * @fn_data: Closure data pointer that will be passed to the notification + * @fn_data: losure data pointer that will be passed to the notification * functions. - * + * * Creates a new #ECalListener object. * * Return value: A newly-created #ECalListener object. @@ -996,10 +978,10 @@ e_cal_listener_new (ECalListenerCalSetModeFn cal_set_mode_fn, NULL); return e_cal_listener_construct (listener, - cal_set_mode_fn, - error_occurred_fn, - categories_changed_fn, - fn_data); + cal_set_mode_fn, + error_occurred_fn, + categories_changed_fn, + fn_data); } /** diff --git a/calendar/libecal/e-cal-listener.h b/calendar/libecal/e-cal-listener.h index 3ee4bc7..43ffbc8 100644 --- a/calendar/libecal/e-cal-listener.h +++ b/calendar/libecal/e-cal-listener.h @@ -41,7 +41,7 @@ typedef struct ECalListenerPrivate ECalListenerPrivate; typedef struct { BonoboObject xobject; - /* Private data */ + /*< private >*/ ECalListenerPrivate *priv; } ECalListener; diff --git a/calendar/libecal/e-cal-util.c b/calendar/libecal/e-cal-util.c index 7681f0c..6207946 100644 --- a/calendar/libecal/e-cal-util.c +++ b/calendar/libecal/e-cal-util.c @@ -433,6 +433,7 @@ compare_alarm_instance (gconstpointer a, gconstpointer b) * @comp: the ECalComponent to generate alarms from * @start: start time * @end: end time + * @omit: * @resolve_tzid: callback for resolving timezones * @user_data: data to be passed to the resolve_tzid callback * @default_timezone: the timezone used to resolve DATE and floating DATE-TIME @@ -441,6 +442,8 @@ compare_alarm_instance (gconstpointer a, gconstpointer b) * Generates alarm instances for a calendar component. Returns the instances * structure, or NULL if no alarm instances occurred in the specified time * range. + * + * Returns: */ ECalComponentAlarms * e_cal_util_generate_alarms_for_comp (ECalComponent *comp, @@ -495,6 +498,7 @@ e_cal_util_generate_alarms_for_comp (ECalComponent *comp, * @comps: list of ECalComponent's * @start: start time * @end: end time + * @omit: * @comp_alarms: list to be returned * @resolve_tzid: callback for resolving timezones * @user_data: data to be passed to the resolve_tzid callback diff --git a/calendar/libecal/e-cal-view-listener.h b/calendar/libecal/e-cal-view-listener.h index eeaeb3d..c90fa55 100644 --- a/calendar/libecal/e-cal-view-listener.h +++ b/calendar/libecal/e-cal-view-listener.h @@ -27,25 +27,25 @@ G_BEGIN_DECLS - - #define E_TYPE_CAL_VIEW_LISTENER (e_cal_view_listener_get_type ()) #define E_CAL_VIEW_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_VIEW_LISTENER, ECalViewListener)) -#define E_CAL_VIEW_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_VIEW_LISTENER, \ - ECalViewListenerClass)) +#define E_CAL_VIEW_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_VIEW_LISTENER, ECalViewListenerClass)) #define E_IS_CAL_VIEW_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_VIEW_LISTENER)) #define E_IS_CAL_VIEW_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_VIEW_LISTENER)) +#define E_CAL_VIEW_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CAL_VIEW_LISTENER, ECalViewListenerClass)) +typedef struct _ECalViewListener ECalViewListener; +typedef struct _ECalViewListenerClass ECalViewListenerClass; typedef struct _ECalViewListenerPrivate ECalViewListenerPrivate; -typedef struct { +struct _ECalViewListener { BonoboObject xobject; - /* Private data */ + /*< private >*/ ECalViewListenerPrivate *priv; -} ECalViewListener; +}; -typedef struct { +struct _ECalViewListenerClass { BonoboObjectClass parent_class; POA_GNOME_Evolution_Calendar_CalViewListener__epv epv; @@ -55,12 +55,10 @@ typedef struct { void (*objects_removed) (ECalViewListener *listener, GList *uids); void (*view_progress) (ECalViewListener *listener, const char *message, int percent); void (*view_done) (ECalViewListener *listener, ECalendarStatus status); -} ECalViewListenerClass; - -GType e_cal_view_listener_get_type (void); -ECalViewListener *e_cal_view_listener_new (void); +}; - +GType e_cal_view_listener_get_type (void); +ECalViewListener *e_cal_view_listener_new (void); G_END_DECLS diff --git a/calendar/libecal/e-cal-view.c b/calendar/libecal/e-cal-view.c index d57185a..adcc16d 100644 --- a/calendar/libecal/e-cal-view.c +++ b/calendar/libecal/e-cal-view.c @@ -200,7 +200,7 @@ e_cal_view_finalize (GObject *object) ECalViewPrivate *priv; g_return_if_fail (object != NULL); - g_return_if_fail (IS_E_CAL_VIEW (object)); + g_return_if_fail (E_IS_CAL_VIEW (object)); view = E_CAL_VIEW (object); priv = view->priv; @@ -233,13 +233,14 @@ e_cal_view_class_init (ECalViewClass *klass) object_class->get_property = e_cal_view_get_property; object_class->finalize = e_cal_view_finalize; - param = g_param_spec_pointer ("view", NULL, NULL, + param = g_param_spec_pointer ("view", "The corba view object", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_VIEW, param); - param = g_param_spec_pointer ("listener", NULL, NULL, + /* FIXME type this property as object? */ + param = g_param_spec_pointer ("listener", "The view listener object to use", NULL, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_LISTENER, param); - param = g_param_spec_object ("client", NULL, NULL, E_TYPE_CAL, + param = g_param_spec_object ("client", "The e-cal for the view", NULL, E_TYPE_CAL, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_CLIENT, param); @@ -317,9 +318,9 @@ e_cal_view_get_type (void) /** * e_cal_view_new: - * @client: Client from which the view is being created. - * @cal: Handle to an open calendar. - * @sexp: S-expression that defines the view. + * @corba_view: + * @listener: + * @client: * * Creates a new view object by issuing the view creation request to the * calendar server. @@ -331,7 +332,7 @@ e_cal_view_new (GNOME_Evolution_Calendar_CalView corba_view, ECalViewListener *l { ECalView *view; - view = g_object_new (E_CAL_VIEW_TYPE, "view", corba_view, "listener", + view = g_object_new (E_TYPE_CAL_VIEW, "view", corba_view, "listener", listener, "client", client, NULL); return view; @@ -348,7 +349,7 @@ e_cal_view_new (GNOME_Evolution_Calendar_CalView corba_view, ECalViewListener *l ECal * e_cal_view_get_client (ECalView *view) { - g_return_val_if_fail (IS_E_CAL_VIEW (view), NULL); + g_return_val_if_fail (E_IS_CAL_VIEW (view), NULL); return view->priv->client; } @@ -360,7 +361,7 @@ e_cal_view_start (ECalView *view) CORBA_Environment ev; g_return_if_fail (view != NULL); - g_return_if_fail (IS_E_CAL_VIEW (view)); + g_return_if_fail (E_IS_CAL_VIEW (view)); priv = view->priv; diff --git a/calendar/libecal/e-cal-view.h b/calendar/libecal/e-cal-view.h index e877d2b..7ccedfb 100644 --- a/calendar/libecal/e-cal-view.h +++ b/calendar/libecal/e-cal-view.h @@ -28,26 +28,25 @@ G_BEGIN_DECLS -typedef struct _ECal ECal; - - - -#define E_CAL_VIEW_TYPE (e_cal_view_get_type ()) -#define E_CAL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_CAL_VIEW_TYPE, ECalView)) -#define E_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_CAL_VIEW_TYPE, ECalViewClass)) -#define IS_E_CAL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_CAL_VIEW_TYPE)) -#define IS_E_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_CAL_VIEW_TYPE)) +#define E_TYPE_CAL_VIEW (e_cal_view_get_type ()) +#define E_CAL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_VIEW, ECalView)) +#define E_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_VIEW, ECalViewClass)) +#define E_IS_CAL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_VIEW)) +#define E_IS_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_VIEW)) +typedef struct _ECalView ECalView; +typedef struct _ECalViewClass ECalViewClass; typedef struct _ECalViewPrivate ECalViewPrivate; +struct _ECal; -typedef struct { - GObject object; +struct _ECalView { + GObject object; - /* Private data */ + /*< private >*/ ECalViewPrivate *priv; -} ECalView; +}; -typedef struct { +struct _ECalViewClass { GObjectClass parent_class; /* Notification signals */ @@ -56,12 +55,12 @@ typedef struct { void (* objects_removed) (ECalView *view, GList *uids); void (* view_progress) (ECalView *view, char *message, int percent); void (* view_done) (ECalView *view, ECalendarStatus status); -} ECalViewClass; +}; GType e_cal_view_get_type (void); -ECalView *e_cal_view_new (GNOME_Evolution_Calendar_CalView corba_view, ECalViewListener *listener, ECal *client); -ECal *e_cal_view_get_client (ECalView *view); +ECalView *e_cal_view_new (GNOME_Evolution_Calendar_CalView corba_view, ECalViewListener *listener, struct _ECal *client); +struct _ECal *e_cal_view_get_client (ECalView *view); void e_cal_view_start (ECalView *view); G_END_DECLS diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c index 8b78f1d..9061d76 100644 --- a/calendar/libecal/e-cal.c +++ b/calendar/libecal/e-cal.c @@ -1256,6 +1256,8 @@ fetch_corba_cal (ECal *ecal, const char *str_uri, CalObjType type) /** * e_cal_new: + * @uri: + * @type: * * Creates a new calendar ecal. It should be initialized by calling * e_cal_open(). @@ -1310,11 +1312,11 @@ e_cal_set_auth_func (ECal *ecal, ECalAuthFunc func, gpointer data) /** * e_cal_open * @ecal: A calendar ecal. - * @str_uri: URI of calendar to open. * @only_if_exists: FALSE if the calendar should be opened even if there * was no storage for it, i.e. to create a new calendar or load an existing * one if it already exists. TRUE if it should only try to load calendars * that already exist. + * @error: * * Makes a calendar ecal initiate a request to open a calendar. The calendar * ecal will emit the "cal_opened" signal when the response from the server is @@ -1498,14 +1500,6 @@ build_uri_list (GNOME_Evolution_Calendar_StringSeq *seq) } #endif -/** - * e_cal_uri_list: - * @ecal: A calendar ecal - * @type: type of uri's to get - * - * - * Return value: A list of URI's open on the server - **/ GList * e_cal_uri_list (ECal *ecal, CalMode mode) { @@ -1595,6 +1589,8 @@ e_cal_get_uri (ECal *ecal) /** * e_cal_is_read_only: * @ecal: A calendar ecal. + * @read_only: + * @error: * * Queries whether the calendar ecal can perform modifications * on the calendar or not. Whether the backend is read only or not @@ -1668,7 +1664,9 @@ e_cal_is_read_only (ECal *ecal, gboolean *read_only, GError **error) /** * e_cal_get_cal_address: * @ecal: A calendar ecal. - * + * @cal_address: + * @error: + * * Queries the calendar address associated with a calendar ecal. * * Return value: The calendar address associated with the calendar that @@ -2103,7 +2101,9 @@ e_cal_get_default_object (ECal *ecal, icalcomponent **icalcomp, GError **error) * e_cal_get_object: * @ecal: A calendar ecal. * @uid: Unique identifier for a calendar component. + * @rid: * @icalcomp: Return value for the calendar component object. + * @error: * * Queries a calendar for a calendar component object based on its unique * identifier. @@ -2319,6 +2319,8 @@ e_cal_free_change_list (GList *list) * e_cal_get_object_list: * @ecal: * @query: + * @objects: + * @error: * * * @@ -2426,10 +2428,12 @@ e_cal_free_object_list (GList *objects) /** * e_cal_get_free_busy - * @ecal:: A calendar ecal. + * @ecal: A calendar ecal. * @users: List of users to retrieve free/busy information for. * @start: Start time for query. * @end: End time for query. + * @freebusy: + * @error: * * Gets free/busy information from the calendar server. * @@ -2833,6 +2837,7 @@ e_cal_get_alarms_for_object (ECal *ecal, const char *uid, * @ecal: A calendar ecal. * @comp: The component to discard the alarm from. * @auid: Unique identifier of the alarm to be discarded. + * @error: * * Tells the calendar backend to get rid of the alarm identified by the * @auid argument in @comp. Some backends might remove the alarm or @@ -3267,14 +3272,16 @@ e_cal_remove_object_with_mod (ECal *ecal, const char *uid, /** * e_cal_remove_object: - * @ecal: A calendar ecal. + * @ecal: A calendar ecal. * @uid: Unique identifier of the calendar component to remove. + * @error: + * * * Asks a calendar to remove a component. If the server is able to remove the * component, all ecals will be notified and they will emit the "obj_removed" * signal. * - * Return value: a #ECalResult value indicating the result of the + * Return value: an #ECalResult value indicating the result of the * operation. **/ gboolean @@ -3605,6 +3612,8 @@ e_cal_add_timezone (ECal *ecal, icaltimezone *izone, GError **error) * e_cal_get_query: * @ecal: A calendar ecal. * @sexp: S-expression representing the query. + * @query: + * @error: * * Creates a live query object from a loaded calendar. * diff --git a/calendar/libecal/e-cal.h b/calendar/libecal/e-cal.h index 35dee49..ec33ee0 100644 --- a/calendar/libecal/e-cal.h +++ b/calendar/libecal/e-cal.h @@ -42,8 +42,8 @@ G_BEGIN_DECLS #define E_CAL_SET_MODE_STATUS_ENUM_TYPE (e_cal_set_mode_status_enum_get_type ()) #define CAL_MODE_ENUM_TYPE (cal_mode_enum_get_type ()) +typedef struct _ECal ECal; typedef struct _ECalClass ECalClass; - typedef struct _ECalPrivate ECalPrivate; /* Open status for the cal_opened signal */ @@ -88,7 +88,7 @@ typedef enum { struct _ECal { GObject object; - /* Private data */ + /*< private >*/ ECalPrivate *priv; };