/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* camel-provider.c : provider framework */ /* * * Author : * Bertrand Guiheneuf * * Copyright 1999, 2000 HelixCode (http://www.helixcode.com) . * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ /* A provider can be added "by hand" or by loading a module. Adding providers with modules. ------------------------------ The modules are shared libraries which must contain the function CamelProvider *camel_provider_module_init (); returning the provider object defined in the module */ /* FIXME: Shouldn't we add a version number to providers ? */ #include "config.h" #include "camel-provider.h" #include "camel-log.h" static GList *_provider_list = NULL; static gchar *_last_error; static gint _provider_name_cmp (gconstpointer a, gconstpointer b) { CamelProvider *provider_a = CAMEL_PROVIDER (a); CamelProvider *provider_b = CAMEL_PROVIDER (b); return strcmp ( provider_a->name, provider_b->name); } void camel_provider_register (CamelProvider *provider) { GList *old_provider_node = NULL; g_assert (provider); if (_provider_list) old_provider_node = g_list_find_custom (_provider_list, provider, _provider_name_cmp); if (old_provider_node != NULL) { /* camel_provider_unref (CAMEL_PROVIDER (old_provider_node->data)); */ old_provider_node->data = provider; } else { /* be careful, we use prepend here, so that last registered providers come first */ _provider_list = g_list_prepend (_provider_list, provider); } /* camel_provider_ref (provider); */ } const CamelProvider * camel_provider_register_as_module (const gchar *module_path) { CamelProvider *new_provider = NULL; GModule *new_module = NULL; CamelProvider * (*camel_provider_module_init) (); gboolean has_module_init; CAMEL_LOG_FULL_DEBUG ("Entering CamelProvider::register_as_module\n"); g_return_val_if_fail (module_path, NULL); if (!g_module_supported ()) { CAMEL_LOG_WARNING ("CamelProvider::register_as_module module loading not supported on this system\n"); CAMEL_LOG_FULL_DEBUG ("Leaving CamelProvider::register_as_module\n"); return NULL; } new_module = g_module_open (module_path, 0); if (!new_module) { printf ("g_module_open reports: %s\n", g_module_error ()); CAMEL_LOG_WARNING ("CamelProvider::register_as_module Unable to load module %s\n", module_path); CAMEL_LOG_FULL_DEBUG ("Leaving CamelProvider::register_as_module\n"); return NULL; } has_module_init = g_module_symbol (new_module, "camel_provider_module_init", (gpointer *)&camel_provider_module_init); if (!has_module_init){ CAMEL_LOG_WARNING ("CamelProvider::register_as_module loading of module %s failed,\n" "\t Symbol camel_provider_module_init not defined in it\n", module_path); CAMEL_LOG_FULL_DEBUG ("Leaving CamelProvider::register_as_module\n"); return NULL; } new_provider = camel_provider_module_init(); new_provider->gmodule = new_module; camel_provider_register (new_provider); CAMEL_LOG_FULL_DEBUG ("Leaving CamelProvider::register_as_module\n"); return new_provider; } /* be careful to this function, @a is expected to be a provider, @b a protocol name (const gchar *) */ static gint _provider_protocol_find (gconstpointer a, gconstpointer b) { CamelProvider *provider_a = CAMEL_PROVIDER (a); const gchar *name_b = (const gchar *)b; return g_strcasecmp ( provider_a->name, name_b); } /** * camel_provider_get_for_protocol: get a registered provider for a protocol * @protocol: protocol name (case insensitive) * @type: provider type (transport, store, ...) * * Look into the list of registered provider if * one correspond both to the protocol name * and to the protocol type. When several providers * exist for a same protocol, the last registered * is returned. * * Return value: Matching provider or NULL if none exists. **/ const CamelProvider * camel_provider_get_for_protocol (const gchar *protocol, ProviderType type) { CamelProvider *current_provider = NULL; GList *current_provider_node; gboolean protocol_is_found; gboolean provider_is_found; g_assert (protocol); g_return_val_if_fail (_provider_list, NULL); current_provider_node = _provider_list; provider_is_found = FALSE; while ((!provider_is_found) && current_provider_node) { current_provider = (CamelProvider *)current_provider_node->data; protocol_is_found = (g_strcasecmp (protocol, current_provider->protocol) == 0); if (protocol_is_found) provider_is_found = (current_provider->provider_type == type); current_provider_node = current_provider_node->next; } if (provider_is_found) return current_provider; else return NULL; } 1be47122f03dc1a354c623772bf5378'>treecommitdiffstats
path: root/math
Commit message (Expand)AuthorAgeFilesLines
* - Reimplement revision 382199.stephen2015-03-272-2/+11
* - Add LICENSE_FILEamdmi32015-03-271-3/+4
* Update gnumeric to 1.12.21.kwm2015-03-272-20/+8
* - Narrow BROKEN down to likely OSVERSIONs.stephen2015-03-271-1/+3
* math/gnumeric: add CPE informationrobak2015-03-261-1/+3
* - Mark broken until I have time to figure it out.stephen2015-03-261-0/+2
* This fails with Clang on 8.4-amd64. Just stick with GCC for now since it isbdrewery2015-03-261-9/+6
* math category: Remove $PTHREAD_LIBSmarino2015-03-2522-78/+55
* - Cleanup WRKSRC: leading v in GH_TAGNAME is removed from DISTNAME in r382120sunpoet2015-03-251-1/+0
* math/lapack: fix build when PROFILE option is selectedrobak2015-03-251-0/+4
* - Add LICENSEamdmi32015-03-241-2/+7
* math/R-cran-car: update to 2.0-25.dbn2015-03-232-3/+3
* Make fonts repecting XDGbapt2015-03-221-1/+1
* - Update to 2.4sunpoet2015-03-223-6/+10
* Update USE_GITHUB so it does not require GH_COMMIT.bdrewery2015-03-202-2/+2
* - Switch to USES=taramdmi32015-03-191-2/+5
* Update to version 0.7.0-rc2.demon2015-03-182-5/+5
* - Strip libraryamdmi32015-03-171-1/+3
* - Update to 1.8sunpoet2015-03-173-7/+7
* - Update to 0.21sunpoet2015-03-142-5/+5
* - Update to 0.52sunpoet2015-03-142-3/+3
* - Dependency change [1]wen2015-03-141-4/+3
* math/spooles: fix docs optionmaho2015-03-141-0/+2
* Uses blaslapack.mk (*), and update to 2.5.4.maho2015-03-143-37/+27
* * Update to 3.8.2maho2015-03-143-58/+2128
* Update to 3.5.0.maho2015-03-145-51/+41
* Clean up the rest of the perl@ Makefiles a bit.adamw2015-03-146-14/+9
* - Correct license.stephen2015-03-131-1/+1
* - Update to 2.1.0.stephen2015-03-132-9/+10
* - Update to 1.1.8.stephen2015-03-132-4/+3
* - Correct the value of octsrc.stephen2015-03-131-1/+2
* Update KDE SC to 4.14.3alonso2015-03-1210-16/+21
* Fix build on 9.3 with clangbdrewery2015-03-121-2/+2
* - Update to 1.2.4.stephen2015-03-112-4/+3
* - Update to 1.4.1.stephen2015-03-112-4/+3
* - Update to 2.2.1.stephen2015-03-112-4/+3
* - Update to 0.51sunpoet2015-03-103-4/+4
* - Update to 4.650.3danilo2015-03-103-4/+4
* Update to 7.4.adamw2015-03-102-4/+3
* Update to version 1.9.2.demon2015-03-092-8/+8
* - Update to 2.2.7.stephen2015-03-092-3/+3
* - Update to 1.0.11.stephen2015-03-092-4/+3
* math/maxima: remove bash dependencyrobak2015-03-081-4/+3
* - Fix build on armv6wen2015-03-072-1/+36
* - Update to 2.1.4wen2015-03-075-44/+72
* Add AVX2 option;demon2015-03-071-1/+7
* - Update to 2.010808sunpoet2015-03-072-7/+7
* - Remove SF from MASTER_SITESsunpoet2015-03-071-4/+7
* - Fix library installationamdmi32015-03-071-2/+4
* - Clarify LICENSEamdmi32015-03-071-2/+6
* math/qtiplot:makc2015-03-071-1/+1
* New port: Theano.demon2015-03-064-0/+29
* - Update to 6.5.stephen2015-03-055-1091/+5
* - Add empty directories to plistamdmi32015-03-052-1/+23
* - Correct breakage caused by autotools upgrade.stephen2015-03-051-0/+13
* Remove Author from pkg-descr and white space fixesbapt2015-03-034-8/+2
* Remove Author from pkg-descr and white space fixesbapt2015-03-037-12/+4
* - Update to 3.24sunpoet2015-03-033-3/+5
* Remove expired port:rene2015-03-027-5866/+0
* math/why: remove hidden references to math/isabellemarino2015-03-021-7/+1
* - Install more DOCS [1]jbeich2015-03-022-3/+18
* Update to GAP 4.7.7johans2015-03-012-4/+4
* - Update to 4.650.2danilo2015-02-273-4/+4
* - Attempt to fix build errors reported by pkg-fallout@.stephen2015-02-261-0/+11
* Force using a modern compiler to fix build on 9.3 which has a broken GCC.bdrewery2015-02-261-1/+1
* Test::Pod and Test::Pod::Coverage are TEST depends, not BUILD/RUN.adamw2015-02-261-3/+3
* Test::Pod is a TEST depends, not BUILD/RUN.adamw2015-02-261-3/+2
* - Update to 0.1.3.stephen2015-02-262-3/+3
* - Update to 0.1.2.stephen2015-02-263-14/+3
* - Update to 4.650.1danilo2015-02-253-4/+4
* - Switch my ports to USE_QT4=linguisttools_build and adjust Qt componentsmakc2015-02-252-5/+2
* - Update to 1.0.6.stephen2015-02-252-4/+3
* - Minor fixes from Apple [1]gabor2015-02-244-2/+37
* 1: add LICENSE.vanilla2015-02-241-1/+3
* switch to USES=tar:tgzvanilla2015-02-241-1/+1
* Fix man pages.thierry2015-02-241-9/+10
* Minpack includes software for solving nonlinear equations and nonlinear leastpawel2015-02-247-0/+118
* Replace using _GCC_VER which is essentially internal to Mk/bsd.gcc.mkgerald2015-02-232-10/+9
* math/ruby-numru_units: remove portrm2015-02-225-60/+0
* Add support for clangriggs2015-02-212-5/+4
* Drop Maintainershiparved2015-02-201-1/+1
* - Update to version 14.1.0jbeich2015-02-203-9/+32
* - Add optional dependency math/octave-forge-level-set.stephen2015-02-201-2/+7
* - New port math/octave-forge-level-set.stephen2015-02-206-0/+53
* Upgrade to 5.1.25.thierry2015-02-202-4/+3
* - Fix build with lang/lua53sunpoet2015-02-201-0/+2
* - Remove deprecated USE_KDE4=kdehiermakc2015-02-201-1/+1
* Update Code_Aster to 11.7.0-1, with its different tools.thierry2015-02-191-1/+1
* - Update to 4.650.0danilo2015-02-183-4/+5
* - Track libgmp dependency via GMP optionjbeich2015-02-171-1/+5
* - Update to version 5.8.1jbeich2015-02-174-33/+29
* - Update p5-Math-BigInt 1.997_1 -> 1.9993adamw2015-02-172-5/+8
* math/libqalculate: really fix build in poudriere with both NLS casespi2015-02-171-5/+3
* math/libqalculate: fix build in poudriere if NLS is not selectedpi2015-02-171-2/+4
* Add powerpc/powerpc64 to the list of ARCH that get libmissing by default.sbruno2015-02-141-1/+3
* math/coinmp: Update to 1.8.0brd2015-02-135-20/+33
* math/py-basemap: Update version 0.9.2=>1.0.7bofh2015-02-113-17/+12
* Repair overflow condition where WCHAR_MAX != INT_MAXsbruno2015-02-112-0/+24
* math/p5-Math-Int128: 0.17 -> 0.20pi2015-02-102-3/+3
* Mark armv6 and mips as ux32 capable to avoid breakage when building forsbruno2015-02-081-2/+1
* Update to version 0.6.1.1pawel2015-02-072-3/+3
* math/ump: Finish original "fix on current"marino2015-02-074-10/+20
* - Fix build on FreeBSD-9.3-RELEASE [1] with a couple ofnivit2015-02-063-2/+32
* math/cloogdanilo2015-02-066-1069/+4
* - Add license_file.stephen2015-02-031-0/+1
* - Update to 1.2.0.stephen2015-02-032-5/+4
* math/jacal: Update version 1c3=>1c4bofh2015-02-023-6/+5
* - Add optional dependency math/octave-forge-interval.stephen2015-02-021-3/+7
* - New port math/octave-forge-interval.stephen2015-02-026-0/+54
* - Update to 14.12.1nivit2015-02-024-15/+24
* Minor update to 0.2.13, some select important updates fromthierry2015-02-013-16/+7
* Deprecate ports broken for more than 6 monthsantoine2015-01-301-0/+2
* math/rubygem-rb-gsl: Add port.xmj2015-01-294-0/+32
* - Update to 4.600.4danilo2015-01-283-4/+4
* - Update to 2.3.1.stephen2015-01-272-4/+3
* - Update to 2.2.1.stephen2015-01-262-4/+3
* - Update to 3.11.10amdmi32015-01-253-7/+6
* Fix detection of libportaudio librariespawel2015-01-252-2/+2
* - Update to 4.2.9.stephen2015-01-252-3/+3
* - Update to 2.7.1.stephen2015-01-252-4/+3
* Update to ocamlgraph 1.8.6johans2015-01-253-6/+8
* Switch some dependencies from a directory name or a file generated by pkg-ins...antoine2015-01-241-1/+1
* Switch ports depending on docbook* through a directory name to a package name,antoine2015-01-241-1/+1
* Remove explicit dependency on javavmwrapper for ports that USE_JAVAantoine2015-01-241-2/+0
* Canonicalize some dependencies on numpyantoine2015-01-232-4/+4
* - Update to 0.07amdmi32015-01-232-4/+3
* - Remove patch no longer needed because of r377711.stephen2015-01-231-11/+0
* - Update to 4.600.3danilo2015-01-203-5/+4
* - Update to 4.2.8.stephen2015-01-203-4/+14
* Remove redundant @execbapt2015-01-201-2/+0
* - Update to 1.8.14sunpoet2015-01-184-3/+4
* - Update to 1.0.17wen2015-01-182-4/+3
* New port: vowpal_wabbit.demon2015-01-156-0/+70
* Update gnumeric to 1.12.18.kwm2015-01-153-59/+63
* - Uses blaslapack and add support for arpackdanilo2015-01-144-6/+26
* Patch to use blaslapack framework.thierry2015-01-141-5/+3
* - Update to 0.7.0lwhsu2015-01-122-5/+4
* Uses blaslapack.mk.thierry2015-01-121-5/+3
* - Update to 0.7.1wen2015-01-104-58/+81
* math/p5-Parse-Range: Pass maintainershipbofh2015-01-101-1/+1
* - Update math/cln to 1.3.4 and bump PORTREVISION of the portswen2015-01-105-6/+6
* fixing two bugs: XWindow re-size and command line Geometry optionsanpei2015-01-082-6/+62
* - Use options;thierry2015-01-081-11/+13
* - Fix *_DEPENDS: ExtUtils::CBuilder and parent already in all supported Perl ...sunpoet2015-01-082-5/+5
* Move MASTER_SITES from CRITICAL to LOCAL/ehauptehaupt2015-01-062-2/+2
* - Update to 4.600.1danilo2015-01-063-4/+4
* - Uses the new blaslapack.mk;thierry2015-01-062-25/+19
* Uses blaslapack.mk.thierry2015-01-061-11/+6
* Uses the new blaslapack.mk.thierry2015-01-061-35/+21
* Assign maintainership of FPC ports to new FPC ports teammarino2015-01-053-3/+3
* - Update to 0.33sunpoet2015-01-053-7/+6
* math/yacas: Unbreak DragonFly by modifying new patch to include it.marino2015-01-041-4/+4
* - Update to 2.12sunpoet2015-01-043-6/+5
* - Update to 3.23sunpoet2015-01-043-5/+4
* - Update to 1.04sunpoet2015-01-043-7/+8
* - Update to 2.05sunpoet2015-01-042-7/+7
* - Update to 2.2.6.stephen2015-01-042-3/+3
* Allow building with new mesaantoine2015-01-041-0/+22
* Allow building with new mesaantoine2015-01-041-0/+22
* - Update to 0.07sunpoet2015-01-042-4/+3
* - Update *_DEPENDSsunpoet2015-01-031-2/+6
* - Update *_DEPENDSsunpoet2015-01-032-13/+11
* - Remove unnecessary DISTFILESsunpoet2015-01-031-1/+0
* - Update to 4.600.0danilo2015-01-033-4/+4
* - Unbreakgahr2015-01-032-2/+28
* - Update BUILD_DEPENDS: ExtUtils::MakeMaker 6.59+ is already in all supported...sunpoet2015-01-021-1/+2
* - Add LICENSEsunpoet2015-01-021-5/+5
* math/nlopt: fix guile2 option after GNOME 3 update.rene2014-12-312-6/+7
* Update devel/doxygen to 1.8.9antoine2014-12-312-15/+47
* Add upstream patch to make the port build with the upcoming CMake 3.1.0.rakuco2014-12-311-0/+52
* math/p5-Math-Int128: 0.15 -> 0.17pi2014-12-302-4/+3
* - Update net/openmpi to 1.8.4danilo2014-12-265-5/+5
* Bump portrevision after png updatebapt2014-12-268-7/+8
* Change libpng15.so to libpng.so in LIB_DEPENDS to prepare the upgradeantoine2014-12-266-6/+6
* - Update to 4.550.4danilo2014-12-253-4/+4
* Properly support png15antoine2014-12-242-24/+1
* Change my non-FreeBSD MAINTAINER mail to bofh@bofh2014-12-2430-30/+30
* Catch up abusive uses of ${SITE_PERL}.mat2014-12-231-1/+1
* Update to Coq 8.4pl5johans2014-12-223-5/+3
* Get rid of gnomehierbapt2014-12-215-9/+10
* Convert to USES=libtoolantoine2014-12-212-1/+4
* cleanup plistbapt2014-12-2112-14/+0
* Explicitely set MASTER_SITES to GHC, fityk is not available on GHantoine2014-12-211-1/+1
* - Use GH_COMMITantoine2014-12-211-6/+3
* Mark BROKEN: fails to buildantoine2014-12-201-0/+2
* - Fix build error with clang 3.5.0.stephen2014-12-192-0/+23
* - Update from 4.550.2 to 4.550.3danilo2014-12-193-4/+4
* Update to version 0.15.2pawel2014-12-172-3/+3
* Fix buildantoine2014-12-171-1/+2
* Update math/R-cran-gss to 2.1-4.dbn2014-12-162-4/+3
* - Change license to correct value.stephen2014-12-151-1/+1
* - Add optional dependency math/octave-forge-optics.stephen2014-12-151-3/+7
* - New port math/octave-forge-optics.stephen2014-12-155-0/+42
* Unbreakantoine2014-12-141-1/+2
* - Separate TeX style files from math/gnuplot into math/gnuplot-tex-extrashrs2014-12-147-17/+155
* - Update to 1.3.6gahr2014-12-124-266/+275
* - Tiny fix to f2py2e.py to allow it to deal with -fstack-protector flagdb2014-12-112-5/+6
* - Reset maintainership of my portsgahr2014-12-1113-13/+13
* - Fix stripamdmi32014-12-101-0/+2
* - Fix stripamdmi32014-12-101-1/+1
* math/py-statsmodels: update to 0.6.1, unbreak, modernizexmj2014-12-103-450/+4675
* - Strip libraryamdmi32014-12-091-0/+3
* cleanup plistbapt2014-12-092-534/+0
* - Update to 6.4.1.stephen2014-12-092-5/+3
* Unbreakantoine2014-12-091-0/+1
* Replace USES=libtool:oldver with USES=libtool or USES=libtool:keepla intijl2014-12-093-3/+3
* - Remove unnecessary BUILD_DEPENDSsunpoet2014-12-091-1/+0
* Unbreakantoine2014-12-081-1/+1
* Update "BSD" license in math categoryfeld2014-12-0814-14/+21
* - Update to 6.4.stephen2014-12-0824-1147/+300
* Canonicalize a few licensesantoine2014-12-073-3/+3
* - Update to 0.34sunpoet2014-12-073-4/+4
* - Update from 4.550.1 to 4.550.2danilo2014-12-053-4/+4
* Update math/R-cran-car to 2.0-22.dbn2014-12-052-4/+3
* Make it more libstdc++ friendly. graphics/gource now builds on 8.x and 9.x.jkim2014-12-052-0/+36
* Don't overwrite Perl's LDDLFLAGS.mat2014-12-041-3/+12
* Revert to 0.9.5.4: recent version requires c++11 compiler and this update breaksdemon2014-12-043-19/+21
* - Update to 0.15.1amdmi32014-12-032-3/+3
* Reset maintainership:bapt2014-12-031-1/+1
* Update to version 0.9.6.1demon2014-12-013-21/+19
* Split devel/gettext in devel/gettext-runtime and devel/gettext-tools. Thetijl2014-11-301-2/+2
* Allow building without /usr/bin/perl symlinkantoine2014-11-291-1/+2
* Fix build without READLINEantoine2014-11-291-3/+1
* Unbreakantoine2014-11-291-1/+1
* - Update to 1.6.3.stephen2014-11-295-142/+5
* altgraph is a fork of graphlib: a graph (network) package for constructingdanfe2014-11-284-0/+29
* Change the way Perl modules are installed, update the default Perl to 5.18.mat2014-11-26288-952/+381
* - Update to 4.550.1danilo2014-11-253-4/+4
* - Update to 2.2.5.stephen2014-11-252-3/+3
* - Use PREFIX/SITE_ARCH_REL because SITE_ARCH is LOCALBASE-basedsunpoet2014-11-251-3/+3
* - Add LICENSEsunpoet2014-11-252-5/+3
* - Strip shared library in post-install:sunpoet2014-11-251-3/+4
* - Update from 4.500.1 to 4.550.0danilo2014-11-233-4/+7
* - Update to 2.0.1sunpoet2014-11-232-5/+7
* Finally retire USE_PGSQLcrees2014-11-231-1/+1
* - Fix build with clangamdmi32014-11-211-0/+11
* The FreeBSD GNOME team proudly presents GNOME 3.14 and Cinnamon 2.2.kwm2014-11-199-900/+880
* Update to GAP 4.7.6johans2014-11-192-4/+4
* math/p5-Math-Int128: fix _DEPENDSpi2014-11-191-2/+2
* math/p5-Math-Int128: 0.13 -> 0.15pi2014-11-193-8/+6
* math/p5-Math-Int64: 0.32 -> 0.34pi2014-11-193-7/+7
* - Update from 4.500.0 to 4.500.1danilo2014-11-193-4/+4
* Reset miwi's maintainership per his demandbapt2014-11-183-3/+3
* Cleanup plistantoine2014-11-1551-471/+4
* Cleanup plistantoine2014-11-1464-685/+12
* Cleanup plistantoine2014-11-14