[evolution-data-server] libecal: Move EDataCalCallStatus back to libedata-cal.



commit a1d63235f2778f6432abf480114c57b021f6a05b
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Dec 16 11:43:01 2012 -0500

    libecal: Move EDataCalCallStatus back to libedata-cal.
    
    I'm encountering a build break in Evolution on an older environment.
    
    It goes something like this...
    
       /* In X11/X.h */
       #define Success 0
    
       /* In libecal/e-cal-types.h */
       typedef enum { Success, ... } EDataCalCallStatus;
    
    After pre-processing, the compiler gets
    
       typedef enum { 0, ... } EDataCalCallStatus;
    
    which of course is a syntax error.
    
    It's our own fault for violating our own namespace.  The enum definition
    was moved from libedata-cal to libecal fairly recently (by me) to resolve
    a circular dependency, but it appears libecal does not really require the
    enum values.  Move the typedef back to libedata-cal as a quick Band-Aid.
    
    The EDataCalCallStatus enum is redundant anyway and I plan to remove it.
    Equivalent error values are provided by EClientError and ECalClientError,
    and calendar backends should be using them directly.  There's no need for
    separate but equal client and server-side error value definitions.
    
    This is technically an API break, but I'm not going to bump the libecal
    soname over this.  The enum definition is clearly intended for backends,
    and because it was moved to libecal only recently, I'm fairly certain no
    client applications are using it.

 calendar/libecal/e-cal-types.h                     |   43 --------------------
 calendar/libecal/e-cal.c                           |    2 +-
 calendar/libedata-cal/e-data-cal.h                 |   43 ++++++++++++++++++++
 .../calendar/libecal/libecal-sections.txt          |    1 -
 .../libedata-cal/libedata-cal-sections.txt         |    1 +
 5 files changed, 45 insertions(+), 45 deletions(-)
---
diff --git a/calendar/libecal/e-cal-types.h b/calendar/libecal/e-cal-types.h
index c0dd6d3..33e2676 100644
--- a/calendar/libecal/e-cal-types.h
+++ b/calendar/libecal/e-cal-types.h
@@ -97,49 +97,6 @@ typedef enum {
 } ECalClientSourceType;
 
 /**
- * EDataCalCallStatus:
- *
- * FIXME Document me!
- *
- * Since: 3.6
- **/
-typedef enum {
-	Success,
-	Busy,
-	RepositoryOffline,
-	PermissionDenied,
-	InvalidRange,
-	ObjectNotFound,
-	InvalidObject,
-	ObjectIdAlreadyExists,
-	AuthenticationFailed,
-	AuthenticationRequired,
-	UnsupportedField,
-	UnsupportedMethod,
-	UnsupportedAuthenticationMethod,
-	TLSNotAvailable,
-	NoSuchCal,
-	UnknownUser,
-	OfflineUnavailable,
-
-	/* These can be returned for successful searches, but
-		indicate the result set was truncated */
-	SearchSizeLimitExceeded,
-	SearchTimeLimitExceeded,
-
-	InvalidQuery,
-	QueryRefused,
-
-	CouldNotCancel,
-
-	OtherError,
-	InvalidServerVersion,
-	InvalidArg,
-	NotSupported,
-	NotOpened
-} EDataCalCallStatus;
-
-/**
  * EDataCalObjType:
  *
  * FIXME Document me!
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 60116a4..9dc5d47 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -154,7 +154,7 @@ get_status_from_error (const GError *error)
 	#undef err
 
 	if G_LIKELY (error == NULL)
-		return Success;
+		return E_CALENDAR_STATUS_OK;
 
 	if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR)) {
 		gchar *name;
diff --git a/calendar/libedata-cal/e-data-cal.h b/calendar/libedata-cal/e-data-cal.h
index c3c54ea..0eb7956 100644
--- a/calendar/libedata-cal/e-data-cal.h
+++ b/calendar/libedata-cal/e-data-cal.h
@@ -115,6 +115,49 @@ struct _EDataCalClass {
 	GObjectClass parent_class;
 };
 
+/**
+ * EDataCalCallStatus:
+ *
+ * FIXME Document me!
+ *
+ * Since: 3.6
+ **/
+typedef enum {
+	Success,
+	Busy,
+	RepositoryOffline,
+	PermissionDenied,
+	InvalidRange,
+	ObjectNotFound,
+	InvalidObject,
+	ObjectIdAlreadyExists,
+	AuthenticationFailed,
+	AuthenticationRequired,
+	UnsupportedField,
+	UnsupportedMethod,
+	UnsupportedAuthenticationMethod,
+	TLSNotAvailable,
+	NoSuchCal,
+	UnknownUser,
+	OfflineUnavailable,
+
+	/* These can be returned for successful searches, but
+		indicate the result set was truncated */
+	SearchSizeLimitExceeded,
+	SearchTimeLimitExceeded,
+
+	InvalidQuery,
+	QueryRefused,
+
+	CouldNotCancel,
+
+	OtherError,
+	InvalidServerVersion,
+	InvalidArg,
+	NotSupported,
+	NotOpened
+} EDataCalCallStatus;
+
 GQuark		e_data_cal_error_quark		(void);
 GError *	e_data_cal_create_error		(EDataCalCallStatus status,
 						 const gchar *custom_msg);
diff --git a/docs/reference/calendar/libecal/libecal-sections.txt b/docs/reference/calendar/libecal/libecal-sections.txt
index 5f02aeb..03ac423 100644
--- a/docs/reference/calendar/libecal/libecal-sections.txt
+++ b/docs/reference/calendar/libecal/libecal-sections.txt
@@ -435,7 +435,6 @@ e_calendar_error_quark
 ECalChangeType
 ECalChange
 ECalendarStatus
-EDataCalCallStatus
 EDataCalObjType
 EDataCalObjModType
 E_CALENDAR_STATUS_CORBA_EXCEPTION
diff --git a/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt b/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
index 5c15a73..4637e1b 100644
--- a/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
+++ b/docs/reference/calendar/libedata-cal/libedata-cal-sections.txt
@@ -254,6 +254,7 @@ e_cal_backend_user_declined
 <TITLE>EDataCal</TITLE>
 E_DATA_CAL_ERROR
 EDataCal
+EDataCalCallStatus
 e_data_cal_create_error
 e_data_cal_create_error_fmt
 e_data_cal_status_to_string



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]