Added Files:
knexportlibraryknregistration.h
knexportlibraryknregistrationmodule.h knrcommon.h
knregistration.h knrfiltermanager.h knrproceduremanager.h
knrredirectmanager.h kntclapi.h
Log Message:
knregistration adds the ability to register procedures, filters, and indirects based on patterns in URIs. Matched portions of these URIs are added to the ns_conn "form" before delivery to the procedure, filter, or indirect request. Requires the knutil library.
--- NEW FILE: knexportlibraryknregistration.h ---
#ifndef KNEXPORTLIBRARYKNREGISTRATION_H
/**
* (c) Copyright 2008 KnowNow, Inc., Sunnyvale CA
*
* @KNOWNOW_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "KnowNow" is a trademark of KnowNow, Inc. and may not
* be used to endorse or promote any product without prior written
* permission from KnowNow, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL KNOWNOW, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @KNOWNOW_LICENSE_END@
**/
#define KNEXPORTLIBRARYKNREGISTRATION_H
#ifdef WIN32
#ifdef EXPORT_LIBRARY_KNREGISTRATION_MODULE
#define EXPORT_LIBRARY_KNREGISTRATION __declspec(dllexport)
#else
#define EXPORT_LIBRARY_KNREGISTRATION __declspec(dllimport)
#endif
#else
#define EXPORT_LIBRARY_KNREGISTRATION
#endif
#endif
--- NEW FILE: knexportlibraryknregistrationmodule.h ---
/*
/**
* (c) Copyright 2008 KnowNow, Inc., Sunnyvale CA
*
* @KNOWNOW_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "KnowNow" is a trademark of KnowNow, Inc. and may not
* be used to endorse or promote any product without prior written
* permission from KnowNow, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL KNOWNOW, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @KNOWNOW_LICENSE_END@
**/
* Defines this modules as part of the knregistration.dll.
* See knexportlibraryknregistration.h for more details.
*/
#define EXPORT_LIBRARY_KNREGISTRATION_MODULE
#include "knexportlibraryknregistration.h"
--- NEW FILE: knrcommon.h ---
#ifndef KN_RCOMMON_H
/**
* (c) Copyright 2008 KnowNow, Inc., Sunnyvale CA
*
* @KNOWNOW_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "KnowNow" is a trademark of KnowNow, Inc. and may not
* be used to endorse or promote any product without prior written
* permission from KnowNow, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL KNOWNOW, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @KNOWNOW_LICENSE_END@
**/
#define KN_RCOMMON_H
#include "ns.h"
#include "knutil/knset.h"
#include "knexportlibraryknregistration.h"
// append this query to the existing query in the conn
bool addQueryToConn(KnSet& toAdd, Ns_Conn* conn);
// remove elements from the query of the conn
bool removeQueryFromConn(KnSet& toRemove, Ns_Conn* conn);
// I really dislike the compilation errors we get with these
// macros. Always interested in a fix. Just put the macro in;
// haven't set up a configuration switch to turn it on or off.
// #define KNREGDBG(a) ((a),1)
#define KNREGDBG(a) (0)
#endif
--- NEW FILE: knregistration.h ---
#ifndef __KN_REGISTRATION_H__
/**
* (c) Copyright 2008 KnowNow, Inc., Sunnyvale CA
*
* @KNOWNOW_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "KnowNow" is a trademark of KnowNow, Inc. and may not
* be used to endorse or promote any product without prior written
* permission from KnowNow, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL KNOWNOW, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @KNOWNOW_LICENSE_END@
**/
#define __KN_REGISTRATION_H__
#include "ns.h"
#include "knexportlibraryknregistration.h"
typedef int (KnRegisteredProc) (void *context, Ns_Conn *conn);
typedef int (KnRegisteredFilter) (void *context, Ns_Conn *conn, int why);
extern EXPORT_LIBRARY_KNREGISTRATION void KnRegisterProc(const char* server, const char* method, bool inheritable, const char* urlTemplate, KnRegisteredProc* proc, void* context);
extern EXPORT_LIBRARY_KNREGISTRATION void KnRegisterTclProc(const char* server, const char* method, bool inheritable, const char* urlTemplate, const char* procName ,const char* args);
extern EXPORT_LIBRARY_KNREGISTRATION bool KnUnregisterProc(const char* server, const char* method, bool inheritable, const char* urlTemplate);
extern EXPORT_LIBRARY_KNREGISTRATION void KnRegisterFilter(const char* server, const char* method, int why, const char* urlTemplate, KnRegisteredFilter* proc, void* context);
extern EXPORT_LIBRARY_KNREGISTRATION void KnRegisterTclFilter(const char* server, const char* method, int why, const char* urlTemplate, const char* procName, const char* args);
extern EXPORT_LIBRARY_KNREGISTRATION bool KnUnregisterFilter(const char* server, const char* method, int why, const char* urlTemplate);
extern EXPORT_LIBRARY_KNREGISTRATION void KnRegisterRedirect(bool internal, const char* method, const char* urlTemplateFrom, const char* urlTemplateTo);
extern EXPORT_LIBRARY_KNREGISTRATION bool KnUnregisterRedirect(const char* method, const char* urlTemplateFrom);
extern EXPORT_LIBRARY_KNREGISTRATION int KnFilterRegistered(void *context, Ns_Conn *conn, int why);
#endif
--- NEW FILE: knrfiltermanager.h ---
#ifndef __KN_RFILTER_MANAGER_H__
/**
* (c) Copyright 2008 KnowNow, Inc., Sunnyvale CA
*
* @KNOWNOW_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "KnowNow" is a trademark of KnowNow, Inc. and may not
* be used to endorse or promote any product without prior written
* permission from KnowNow, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL KNOWNOW, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @KNOWNOW_LICENSE_END@
**/
#define __KN_RFILTER_MANAGER_H__
#include "knutil/kntemplateuri.h"
#include "knexportlibraryknregistration.h"
#include "knregistration.h"
/* ------------------------------------------------------------------------- */
/* IKnRFilterHandler */
/* ------------------------------------------------------------------------- */
class IKnRFilterHandler
{
public:
IKnRFilterHandler(const char* server, const char* method, int why, const char* urlTemplate);
virtual ~IKnRFilterHandler();
virtual int handle(void *context, Ns_Conn *conn, int why) = 0;
std::string getID();
static std::string getID(const char* server, const char* method, int why);
std::string m_server;
std::string m_method;
int m_why;
std::string m_urlTemplate;
};
/* ------------------------------------------------------------------------- */
/* KnCRFilterHandler */
/* ------------------------------------------------------------------------- */
class KnCRFilterHandler : public IKnRFilterHandler
{
public:
KnCRFilterHandler(const char* server, const char* method, int why, const char* urlTemplate, KnRegisteredFilter* proc, void* context);
int handle(void *context, Ns_Conn *conn, int why);
KnRegisteredFilter* m_proc;
void* m_context;
};
/* ------------------------------------------------------------------------- */
/* KnTclRFilterHandler */
/* ------------------------------------------------------------------------- */
class KnTclRFilterHandler : public IKnRFilterHandler
{
public:
KnTclRFilterHandler(const char* server, const char* method, int why, const char* urlTemplate, const char* proc, const char* args);
int handle(void *context, Ns_Conn *conn, int why);
std::string m_proc;
std::string m_args;
};
/* ------------------------------------------------------------------------- */
/* KnRFilterManager */
/* ------------------------------------------------------------------------- */
class KnRFilterManager
{
public:
void registerFilter(IKnRFilterHandler* fh);
bool removeFilter(const char* server, const char* method, int why, const char* urlTemplate);
int runFilters(void *context, Ns_Conn *conn, int why);
typedef KnPatternList<KnTemplateURI, IKnRFilterHandler> PatternsType;
typedef KnPatternFinder<std::string, PatternsType, KnTemplateURI, IKnRFilterHandler> FinderType;
typedef std::vector< std::pair < KnSet*, KnSmartRef<IKnRFilterHandler> > > ResultType;
private:
FinderType m_filterFinder;
};
#endif
--- NEW FILE: knrproceduremanager.h ---
#ifndef __KN_RPROCEDURE_MANAGER_H__
/**
* (c) Copyright 2008 KnowNow, Inc., Sunnyvale CA
*
* @KNOWNOW_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "KnowNow" is a trademark of KnowNow, Inc. and may not
* be used to endorse or promote any product without prior written
* permission from KnowNow, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL KNOWNOW, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @KNOWNOW_LICENSE_END@
**/
#define __KN_RPROCEDURE_MANAGER_H__
#include "knutil/kntemplateuri.h"
#include "knexportlibraryknregistration.h"
#include "knregistration.h"
/* ------------------------------------------------------------------------- */
/* IKnRProcedureHandler */
/* ------------------------------------------------------------------------- */
class IKnRProcedureHandler
{
public:
IKnRProcedureHandler(const char* server, const char* method, const char* urlTemplate, bool inheritable) ;
virtual ~IKnRProcedureHandler();
virtual int handle(void* context, Ns_Conn* conn) = 0;
virtual bool isInheritable();
std::string getID();
static std::string getID(const char* server, const char* method);
bool m_inheritable;
std::string m_server;
std::string m_method;
std::string m_urlTemplate;
};
/* ------------------------------------------------------------------------- */
/* KnRProcedureInfo */
/* ------------------------------------------------------------------------- */
class KnRProcedureInfo
{
public:
KnRProcedureInfo();
KnRProcedureInfo(IKnRProcedureHandler* ph);
~KnRProcedureInfo();
bool hasInheritable();
bool hasExact();
bool removeHandler(bool inheritable);
int handle(void* context, Ns_Conn* conn);
int handleInheritable(void* context, Ns_Conn* conn);
void set(IKnRProcedureHandler* ph);
private:
IKnRProcedureHandler* m_exact;
IKnRProcedureHandler* m_inheritable;
};
/* ------------------------------------------------------------------------- */
/* KnCRProcedureHandler */
/* ------------------------------------------------------------------------- */
class KnCRProcedureHandler : public IKnRProcedureHandler
{
public:
KnCRProcedureHandler(const char* server, const char* method, const char* urlTemplate, bool inheritable, KnRegisteredProc* proc, void* context);
int handle(void* context, Ns_Conn* conn);
KnRegisteredProc* m_proc;
void* m_context;
};
/* ------------------------------------------------------------------------- */
/* KnTclRProcedureHandler */
/* ------------------------------------------------------------------------- */
class KnTclRProcedureHandler : public IKnRProcedureHandler
{
public:
KnTclRProcedureHandler(const char* server, const char* method, const char* urlTemplate, bool inheritable, const char* proc, const char* args);
int handle(void* context, Ns_Conn* conn);
std::string m_proc;
std::string m_args;
};
/* ------------------------------------------------------------------------- */
/* KnRProcedureManager */
/* ------------------------------------------------------------------------- */
class KnRProcedureManager
{
public:
void registerProc(IKnRProcedureHandler* ph);
bool removeProcedure(const char* server, const char* method, bool inheritable, const char* urlTemplate);
int runProcedures(void* context, Ns_Conn* conn);
typedef KnPatternSet<KnTemplateURI, KnRProcedureInfo> PatternsType;
typedef KnPatternFinder<std::string, PatternsType, KnTemplateURI, KnRProcedureInfo> FinderType;
typedef std::vector< std::pair < KnSet*, KnSmartRef<KnRProcedureInfo> > > ResultType;
private:
FinderType m_procFinder;
};
#endif
--- NEW FILE: knrredirectmanager.h ---
#ifndef __KN_RREDIRECT_MANAGER_H__
/**
* (c) Copyright 2008 KnowNow, Inc., Sunnyvale CA
*
* @KNOWNOW_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "KnowNow" is a trademark of KnowNow, Inc. and may not
* be used to endorse or promote any product without prior written
* permission from KnowNow, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL KNOWNOW, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @KNOWNOW_LICENSE_END@
**/
#define __KN_RREDIRECT_MANAGER_H__
#include "knutil/kntemplateuri.h"
#include "knexportlibraryknregistration.h"
/* ------------------------------------------------------------------------- */
/* KnRRedirectInfo */
/* ------------------------------------------------------------------------- */
class KnRRedirectInfo
{
public:
KnRRedirectInfo(bool internal, const char* method, const char* urlTemplateFrom, const char* urlTemplateTo);
bool m_internal;
std::string m_method;
std::string m_urlTemplateFrom;
std::string m_urlTemplateTo;
};
/* ------------------------------------------------------------------------- */
/* KnRRedirectManager */
/* ------------------------------------------------------------------------- */
class KnRRedirectManager
{
public:
KnRRedirectManager();
~KnRRedirectManager();
void addRedirect(KnRRedirectInfo* ri);
bool removeRedirect(const char* method, const char* urlTemplateFrom);
int redirect(void* context, Ns_Conn* conn);
typedef KnPatternSet<KnTemplateURI,KnRRedirectInfo> PatternSet;
typedef KnPatternFinder<std::string, KnPatternSet<KnTemplateURI, KnRRedirectInfo>, KnTemplateURI, KnRRedirectInfo> FinderType;
private:
FinderType m_redirectFinder;
};
#endif
--- NEW FILE: kntclapi.h ---
#ifndef __KNTCLAPI_H__
/**
* (c) Copyright 2008 KnowNow, Inc., Sunnyvale CA
*
* @KNOWNOW_LICENSE_START@
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "KnowNow" is a trademark of KnowNow, Inc. and may not
* be used to endorse or promote any product without prior written
* permission from KnowNow, Inc.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL KNOWNOW, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @KNOWNOW_LICENSE_END@
**/
#define __KNTCLAPI_H__
#include "tcl.h"
#include "knexportlibraryknregistration.h"
namespace KnRegister_TclCommands
{
extern "C"
{
int kn_registerproc ( void * context, Tcl_Interp* interp, int objc, Tcl_Obj * objv[]);
int kn_registerfilter ( void * context, Tcl_Interp* interp, int objc, Tcl_Obj * objv[]);
int kn_registerredirect ( void * context, Tcl_Interp* interp, int objc, Tcl_Obj * objv[]);
int kn_unregister ( void * context, Tcl_Interp* interp, int objc, Tcl_Obj * objv[]);
}
int AddCmds(Tcl_Interp *nsInterp, void *context);
}
#endif
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
aolserver-commits mailing list
aolserve...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-commits