aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-service.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-02 07:07:18 +0800
committerDan Winship <danw@src.gnome.org>2000-07-02 07:07:18 +0800
commit98753e92d2b6bb52978c2ac9d38d29b8d2372978 (patch)
tree89bb98c0ad5d252931f0e65c9db1d904c8324d96 /camel/camel-service.c
parent6dabd2bd964e2e6692fa01261104fe4a510a0fa8 (diff)
downloadgsoc2013-evolution-98753e92d2b6bb52978c2ac9d38d29b8d2372978.tar.gz
gsoc2013-evolution-98753e92d2b6bb52978c2ac9d38d29b8d2372978.tar.zst
gsoc2013-evolution-98753e92d2b6bb52978c2ac9d38d29b8d2372978.zip
New method, to return an end-user-friendly name corresponding to a
* camel-service.c (camel_service_get_name): New method, to return an end-user-friendly name corresponding to a service. (eg, "POP service for danw on trna.helixcode.com"). * providers/imap/camel-imap-store.c, providers/mbox/camel-mbox-store.c, providers/nntp/camel-nntp-store.c, providers/pop3/camel-pop3-store.c, providers/sendmail/camel-sendmail-transport.c, providers/smtp/camel-smtp-transport.c: Implement. svn path=/trunk/; revision=3851
Diffstat (limited to 'camel/camel-service.c')
-rw-r--r--camel/camel-service.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/camel/camel-service.c b/camel/camel-service.c
index 1efcafcfe8..ec2e4d3712 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -41,6 +41,7 @@ static gboolean service_disconnect(CamelService *service, CamelException *ex);
static gboolean is_connected (CamelService *service);
static GList * query_auth_types (CamelService *service, CamelException *ex);
static void free_auth_types (CamelService *service, GList *authtypes);
+static char * get_name (CamelService *service, gboolean brief);
static void finalize (GtkObject *object);
static gboolean check_url (CamelService *service, CamelException *ex);
@@ -60,6 +61,7 @@ camel_service_class_init (CamelServiceClass *camel_service_class)
camel_service_class->is_connected = is_connected;
camel_service_class->query_auth_types = query_auth_types;
camel_service_class->free_auth_types = free_auth_types;
+ camel_service_class->get_name = get_name;
/* virtual method overload */
gtk_object_class->finalize = finalize;
@@ -262,6 +264,36 @@ camel_service_get_url (CamelService *service)
}
+static char *
+get_name (CamelService *service, gboolean brief)
+{
+ g_warning ("CamelService::get_name not implemented for `%s'",
+ gtk_type_name (GTK_OBJECT_TYPE (service)));
+ return "???";
+}
+
+/**
+ * camel_service_get_name:
+ * @service: the service
+ * @brief: whether or not to use a briefer form
+ *
+ * This gets the name of the service in a "friendly" (suitable for
+ * humans) form. If @brief is %TRUE, this should be a brief description
+ * such as for use in the folder tree. If @brief is %FALSE, it should
+ * be a more complete and mostly unambiguous description.
+ *
+ * Return value: the description, which the caller must free.
+ **/
+char *
+camel_service_get_name (CamelService *service, gboolean brief)
+{
+ g_return_val_if_fail (CAMEL_IS_SERVICE (service), NULL);
+ g_return_val_if_fail (service->url, NULL);
+
+ return CSERV_CLASS (service)->get_name (service, brief);
+}
+
+
/**
* camel_service_get_session:
* @service: a service
@@ -329,7 +361,6 @@ camel_service_free_auth_types (CamelService *service, GList *authtypes)
}
-
/* URL utility routines */
/**
nome/commit/french?h=dependabot/npm_and_yarn/devel/electron4/files/lodash-4.17.19&id=5a2694f1116f9e74ed58477b8d2584e7baf725ec'>Mark BROKEN: unfetchableantoine2019-03-121-0/+1 * Move math/mumps-edf to math/mumps.thierry2019-03-111-2/+2 * Update wordpress to 5.1joneum2019-02-282-4/+4 * */gimp-help*: Mark MAKE_JOBS_UNSAFEtobik2019-02-241-1/+1 * - Fix BROKEN: actually it is broken on amd64 for all versions since r490369thierry2019-02-172-10/+4 * Switch lrelease from Qt4 to Qt5.thierry2019-02-021-2/+2 * Comment the BROKEN lines.thierry2019-01-271-2/+2 * Note the exact cause of the failure (conflict with the file proto.hthierry2019-01-271-2/+2 * Update to 5.0.3joneum2019-01-102-4/+4 * Do not set CATEGORIES twicetobik2019-01-061-1/+0 * Remove KDE4, part 5rene2019-01-015-2333/+0 * Remove expired ports:rene2018-12-212-10/+0 * wordpress: Update to 5.0.2joneum2018-12-202-4/+4 * wordpress: Update to 5.0.1joneum2018-12-152-4/+4 * Bump PORTREVISION for ports depending on the canonical version of GCCgerald2018-12-124-2/+4 * - Update WWWamdmi32018-12-101-1/+1 * Mark QT4 ports/functionality for removal on 2019-03-15rene2018-12-021-0/+3 * Mark kde4-l10n ports deprecated.tcberner2018-11-241-0/+3 * Update to 6.0.7.jkim2018-11-091-5/+5 * Upgrade science/hdf5-18 to 1.8.21.thierry2018-11-092-4/+5 * Expand FreeBSD 12 conditionals to include 13.0-CURRENTjbeich2018-10-241-0/+1 * Cleanup plistsantoine2018-10-011-1289/+1289 * Update to 6.3sunpoet2018-08-222-4/+4 * Upgrade Code_Aster to 13.6.0-1.thierry2018-08-188-2703/+2101 * Update to 4.9.8joneum2018-08-072-4/+4 * Bump PORTREVISION for ports depending on the canonical version of GCCgerald2018-07-302-2/+2 * Update to 4.9.7joneum2018-07-082-4/+4 * Replace bsd.qt.mk by Uses/qt.mk and Uses/qt-dist.mktcberner2018-06-291-2/+2 * - Update to 6.0.5lwhsu2018-06-271-5/+5 * - Switch to new test frameworkamdmi32018-06-071-17/+14 * homard is not compatible with python3antoine2018-05-281-1/+1 * Update to 4.9.6joneum2018-05-262-4/+4 * - Update to 6.0.4lwhsu2018-05-101-5/+5 * Since the upgrade of math/suitesparse to 5.2.0, it depends unconditionnaly onthierry2018-05-061-6/+3 * Mark BROKEN: conflicting dependenciesantoine2018-05-061-0/+2 * Only sleep in ports if BATCH/PACKAGE_BUILDING are not defined.mat2018-04-261-0/+2 * Update to 4.9.5joneum2018-04-212-4/+4 * - Revert r467691, testing this port requires installing it and some manual workamdmi32018-04-191-1/+1 * - Switch to new test frameworkamdmi32018-04-181-1/+1 * - Update to 6.0.3lwhsu2018-04-081-5/+5 * - Fix LICENSEamdmi32018-03-252-5/+5 * - Update LibreOffice to 6.0.2 [1]lwhsu2018-03-172-8/+5 * - Update WWWamdmi32018-03-132-1/+3 * Bump PORTREVISIONs of all users of math/mpc that we just updated togerald2018-03-113-3/+3 * - Update WWWamdmi32018-03-031-1/+1 * Remove dependency on the python metaportsantoine2018-02-201-2/+4 * Rename KDE4 meta portstcberner2018-02-101-1/+1 * Update to 4.9.4joneum2018-02-102-4/+4 * devel/eric6: update to 18.02dbn2018-02-083-11/+0 * Fix build on head.thierry2018-01-281-0/+1 * Securityupdate to 4.9.2:joneum2018-01-192-4/+4 * lang/eric6: update to 17.12dbn2018-01-171-3/+3 * devel/eric6: update to 17.11.1, add FLAVORSdbn2018-01-111-3/+3 * Update MASTER_SITES and WWWsunpoet2017-12-282-2/+2 * Update to 6.2sunpoet2017-12-082-4/+4 * Upgrade HDF5 to 1.8.20.thierry2017-12-032-4/+5 * Securityupdate to 4.9.1:joneum2017-12-022-6/+6 * Convert Python ports to FLAVORS.mat2017-11-302-2/+2 * Update to 4.9joneum2017-11-252-4/+4 * Upgrade - endly! - to Code_Aster 13.4.0-3.thierry2017-11-1524-2745/+8168 * Update to 5.3.7.jkim2017-11-031-5/+5 * */wordpress: update to 4.8.3joneum2017-11-022-4/+4 * evel/eric6: update to 17.10dbn2017-10-271-3/+3 * - Update to 4.8.2joneum2017-09-282-4/+4 * Update to 6.1sunpoet2017-09-272-6/+6 * Fix kde4-l10n packages after sysutils/filelight's updatetcberner2017-09-172-5/+1 * Bump PORTREVISION for ports depending on the canonical version of GCCgerald2017-09-113-3/+3 * Update to 5.3.6.jkim2017-09-061-5/+5 * - french/wordpress: Update from 4.8 to 4.8.1joneum2017-08-042-7/+5 * Update to 5.3.5.jkim2017-08-041-5/+5 * Mark BROKEN: size and checksum mismatchantoine2017-07-021-0/+2 * Update to 5.3.4.jkim2017-06-221-5/+5 * Update the Calligra ports to 3.0.1.rakuco2017-06-175-123/+0 * Upgrade science/hdf5-18 to 1.8.19.thierry2017-06-172-2/+2 * - Update 4 wordpress Ports to version 4.8joneum2017-06-122-4/+4 * - Update the Wordpress ports to 4.7.5joneum2017-05-222-4/+4 * Update to 5.3.3.jkim2017-05-201-5/+5 * - Update maintainer addressjoneum2017-05-161-1/+1 * Update to 5.2.7.jkim2017-05-05