Changeset 475

Show
Ignore:
Timestamp:
04/07/06 03:35:24 (2 years ago)
Author:
common
Message:

library/modules/{dnsresolve-adns,geolocation-ip2location,geolocation-geoip}
- s/Nepenthes/Library/g
- s/nepenthes/library/g
the geolocation foobar is not verified to load yet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • library/trunk/modules/dnsresolve-adns/Makefile.am

    r332 r475  
    1 # nepenthes module Makefile 
     1# library module Makefile 
    22# Paul Baecher, Maximillian Dornseif, Markus Koetter 
    33# $Id$ 
     
    55AUTOMAKE_OPTIONS = foreign 
    66 
    7 AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE 
     7AM_CPPFLAGS = -I$(top_srcdir)/library-core/include -I$(top_srcdir)/library-core/src -pipe -D _GNU_SOURCE 
    88AM_CXXFLAGS = -Wall -Werror 
    99AM_LDFLAGS = -ladns 
  • library/trunk/modules/dnsresolve-adns/dnsresolve-adns.cpp

    r408 r475  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    5151using namespace std; 
    5252 
    53 using namespace nepenthes
    54  
    55 Nepenthes *g_Nepenthes
    56  
    57 DNSResolverADNS::DNSResolverADNS(Nepenthes *nepenthes
     53using namespace library
     54 
     55Library *g_Library
     56 
     57DNSResolverADNS::DNSResolverADNS(Library *library
    5858{ 
    5959        m_ModuleName        = "dnsresolve-adns"; 
     
    6868        m_Timeout = 0; 
    6969 
    70         g_Nepenthes = nepenthes
     70        g_Library = library
    7171} 
    7272 
     
    8686        } 
    8787 
    88         g_Nepenthes->getDNSMgr()->registerDNSHandler(this); 
     88        g_Library->getDNSMgr()->registerDNSHandler(this); 
    8989        REG_EVENT_HANDLER(this); 
    9090        logDebug("%s","adns_init() Success\n"); 
     
    223223 
    224224 
    225 extern "C" int32_t module_init(int32_t version, Module **module, Nepenthes *nepenthes
     225extern "C" int32_t module_init(int32_t version, Module **module, Library *library
    226226{ 
    227227        if (version == MODULE_IFACE_VERSION) { 
    228         *module = new DNSResolverADNS(nepenthes); 
     228        *module = new DNSResolverADNS(library); 
    229229        return 1; 
    230230    } else { 
  • library/trunk/modules/dnsresolve-adns/dnsresolve-adns.hpp

    r332 r475  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    3232#include "Module.hpp" 
    3333#include "ModuleManager.hpp" 
    34 #include "Nepenthes.hpp" 
     34#include "Library.hpp" 
    3535#include "Socket.hpp" 
    3636 
     
    4141using namespace std; 
    4242 
    43 namespace nepenthes 
     43namespace library 
    4444{ 
    4545        struct ADNSContext  
     
    5252        { 
    5353        public: 
    54                 DNSResolverADNS(Nepenthes *); 
     54                DNSResolverADNS(Library *); 
    5555                ~DNSResolverADNS(); 
    5656 
     
    7272} 
    7373 
    74 extern nepenthes::Nepenthes *g_Nepenthes
     74extern library::Library *g_Library
  • library/trunk/modules/geolocation-geoip/Makefile.am

    r332 r475  
    1 # nepenthes module Makefile 
     1# library module Makefile 
    22# Paul Baecher, Maximillian Dornseif, Markus Koetter 
    33# $Id$ 
     
    55AUTOMAKE_OPTIONS = foreign 
    66 
    7 AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -I/opt/geoip/include/ -pipe -D _GNU_SOURCE 
     7AM_CPPFLAGS = -I$(top_srcdir)/library-core/include -I$(top_srcdir)/library-core/src -I/opt/geoip/include/ -pipe -D _GNU_SOURCE 
    88AM_CXXFLAGS = -Wall -Werror 
    99# AM_LDFLAGS = /opt/geoip/lib/libGeoIP.a 
  • library/trunk/modules/geolocation-geoip/geolocation-geoip.cpp

    r332 r475  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    5959#define STDTAGS l_mod 
    6060 
    61 using namespace nepenthes
     61using namespace library
    6262 
    6363 
    6464/** 
    65  * as we may need a global pointer to our Nepenthes in our modules, 
    66  * and cant access the cores global pointer to nepenthes 
    67  * we have to use a own global pointer to nepenthes per module 
     65 * as we may need a global pointer to our Library in our modules, 
     66 * and cant access the cores global pointer to library 
     67 * we have to use a own global pointer to library per module 
    6868 * we need this pointer for logInfo() etc 
    6969 */ 
    70 Nepenthes *g_Nepenthes
     70Library *g_Library
    7171 
    7272/** 
     
    8383 * - m_DialogueFactoryDescription 
    8484 *  
    85  * @param nepenthes the pointer to our Nepenthes 
     85 * @param library the pointer to our Library 
    8686 */ 
    87 GeoLocationGeoIp::GeoLocationGeoIp(Nepenthes *nepenthes
     87GeoLocationGeoIp::GeoLocationGeoIp(Library *library
    8888{ 
    8989        m_ModuleName        = "geolocation-geoip"; 
    9090        m_ModuleDescription = "resolve ips to coordinates using maxdata geoip city"; 
    9191        m_ModuleRevision    = "$Rev$"; 
    92         m_Nepenthes = nepenthes
     92        m_Library = library
    9393 
    94         g_Nepenthes = nepenthes
     94        g_Library = library
    9595} 
    9696 
     
    114114        m_GeoIP = GeoIP_open("/opt/geoip/share/GeoIP/GeoIPCity.dat", GEOIP_INDEX_CACHE); 
    115115 
    116         if ( g_Nepenthes->getGeoMgr()->registerGeolocationHandler(this) == false) 
     116        if ( g_Library->getGeoMgr()->registerGeolocationHandler(this) == false) 
    117117        { 
    118118                logCrit("%s","Could not register as GeolocationHandler\n"); 
     
    151151} 
    152152 
    153 extern "C" int32_t module_init(int32_t version, Module **module, Nepenthes *nepenthes
     153extern "C" int32_t module_init(int32_t version, Module **module, Library *library
    154154{ 
    155155        if (version == MODULE_IFACE_VERSION) { 
    156         *module = new GeoLocationGeoIp(nepenthes); 
     156        *module = new GeoLocationGeoIp(library); 
    157157        return 1; 
    158158    } else { 
  • library/trunk/modules/geolocation-geoip/geolocation-geoip.hpp

    r332 r475  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    4040#include "ModuleManager.hpp" 
    4141#include "SocketManager.hpp" 
    42 #include "Nepenthes.hpp" 
     42#include "Library.hpp" 
    4343#include "Dialogue.hpp" 
    4444#include "Socket.hpp" 
     
    4949using namespace std; 
    5050 
    51 namespace nepenthes 
     51namespace library 
    5252{ 
    5353 
     
    5555        { 
    5656        public: 
    57                 GeoLocationGeoIp(Nepenthes *); 
     57                GeoLocationGeoIp(Library *); 
    5858                ~GeoLocationGeoIp(); 
    5959                bool Init(); 
     
    6868        }; 
    6969} 
    70 extern nepenthes::Nepenthes *g_Nepenthes
     70extern library::Library *g_Library
    7171 
    7272#endif // HAVE_GEOLOCATION 
  • library/trunk/modules/geolocation-ip2location/Makefile.am

    r339 r475  
    1 # nepenthes module Makefile 
     1# library module Makefile 
    22# Paul Baecher, Maximillian Dornseif, Markus Koetter 
    33# $Id$ 
     
    55AUTOMAKE_OPTIONS = foreign 
    66 
    7 AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -I/opt/ip2location/include/ -pipe -D _GNU_SOURCE 
     7AM_CPPFLAGS = -I$(top_srcdir)/library-core/include -I$(top_srcdir)/library-core/src -I/opt/ip2location/include/ -pipe -D _GNU_SOURCE 
    88AM_CXXFLAGS = -Wall -Werror 
    99AM_LDFLAGS = $IP2LOCATION_LIBS 
  • library/trunk/modules/geolocation-ip2location/geolocation-ip2location.conf.dist

    r339 r475  
    11geolocation-ip2location 
    22{ 
    3         path "/opt/nepenthes/var/cache/nepenthes/IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE.BIN"; 
     3        path "/opt/library/var/cache/library/IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE.BIN"; 
    44}; 
  • library/trunk/modules/geolocation-ip2location/geolocation-ip2location.cpp

    r336 r475  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    6161#define STDTAGS l_mod 
    6262 
    63 using namespace nepenthes
     63using namespace library
    6464 
    6565 
    6666/** 
    67  * as we may need a global pointer to our Nepenthes in our modules, 
    68  * and cant access the cores global pointer to nepenthes 
    69  * we have to use a own global pointer to nepenthes per module 
     67 * as we may need a global pointer to our Library in our modules, 
     68 * and cant access the cores global pointer to library 
     69 * we have to use a own global pointer to library per module 
    7070 * we need this pointer for logInfo() etc 
    7171 */ 
    72 Nepenthes *g_Nepenthes
     72Library *g_Library
    7373 
    7474/** 
     
    8585 * - m_DialogueFactoryDescription 
    8686 *  
    87  * @param nepenthes the pointer to our Nepenthes 
     87 * @param library the pointer to our Library 
    8888 */ 
    89 GeoLocationIp2Location::GeoLocationIp2Location(Nepenthes *nepenthes
     89GeoLocationIp2Location::GeoLocationIp2Location(Library *library
    9090{ 
    9191        m_ModuleName        = "geolocation-ip2location"; 
    9292        m_ModuleDescription = "resolve ips to coordinates using p2location DB5"; 
    9393        m_ModuleRevision    = "$Rev$"; 
    94         m_Nepenthes = nepenthes
     94        m_Library = library
    9595 
    96         g_Nepenthes = nepenthes
     96        g_Library = library
    9797} 
    9898 
     
    137137 
    138138 
    139         if ( g_Nepenthes->getGeoMgr()->registerGeolocationHandler(this) == false) 
     139        if ( g_Library->getGeoMgr()->registerGeolocationHandler(this) == false) 
    140140        { 
    141141                logCrit("%s","Could not register as GeolocationHandler\n"); 
     
    178178} 
    179179 
    180 extern "C" int32_t module_init(int32_t version, Module **module, Nepenthes *nepenthes
     180extern "C" int32_t module_init(int32_t version, Module **module, Library *library
    181181{ 
    182182        if (version == MODULE_IFACE_VERSION) { 
    183         *module = new GeoLocationIp2Location(nepenthes); 
     183        *module = new GeoLocationIp2Location(library); 
    184184        return 1; 
    185185    } else { 
  • library/trunk/modules/geolocation-ip2location/geolocation-ip2location.hpp

    r336 r475  
    11/******************************************************************************** 
    2  *                              Nepenthes 
     2 *                              Library 
    33 *                        - finest collection - 
    44 * 
     
    2222 *  
    2323 *  
    24  *             contact nepenthesdev@users.sourceforge.net   
     24 *             contact librarydev@users.sourceforge.net   
    2525 * 
    2626 *******************************************************************************/ 
     
    4040#include "ModuleManager.hpp" 
    4141#include "SocketManager.hpp" 
    42 #include "Nepenthes.hpp" 
     42#include "Library.hpp" 
    4343#include "Dialogue.hpp" 
    4444#include "Socket.hpp" 
     
    4949using namespace std; 
    5050 
    51 namespace nepenthes 
     51namespace library 
    5252{ 
    5353 
     
    5555        { 
    5656        public: 
    57                 GeoLocationIp2Location(Nepenthes *); 
     57                GeoLocationIp2Location(Library *); 
    5858                ~GeoLocationIp2Location(); 
    5959                bool Init(); 
     
    6969        }; 
    7070} 
    71 extern nepenthes::Nepenthes *g_Nepenthes
     71extern library::Library *g_Library
    7272 
    7373#endif // HAVE_GEOLOCATION