text: /*
   *  pubsubpluginREDISCLUSTER: Generic GUCEF COMCORE plugin for providing pubsub via Redis
   *
   *  Copyright (C) 1998 - 2020.  Dinand Vanvelzen
   *
   *  Licensed under the Apache License, Version 2.0 (the "License");
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *    http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an "AS IS" BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  
  /*-------------------------------------------------------------------------//
  //                                                                         //
  //      INCLUDES                                                           //
  //                                                                         //
  //-------------------------------------------------------------------------*/
  
  #ifndef GUCEF_COMCORE_CPUBSUBCLIENTFACTORY_H
  #include "gucefCOMCORE_CPubSubClientFactory.h"
  #define GUCEF_COMCORE_CPUBSUBCLIENTFACTORY_H
  #endif /* GUCEF_COMCORE_CPUBSUBCLIENTFACTORY_H ? */
  
  #ifndef GUCEF_COMCORE_CCOMCOREGLOBAL_H
  #include "gucefCOMCORE_CComCoreGlobal.h"
  #define GUCEF_COMCORE_CCOMCOREGLOBAL_H
  #endif /* GUCEF_COMCORE_CCOMCOREGLOBAL_H ? */
  
  #ifndef PUBSUBPLUGIN_REDISCLUSTER_CREDISCLUSTERPUBSUBCLIENT_H
  #include "pubsubpluginREDISCLUSTER_CRedisClusterPubSubClient.h"
  #define PUBSUBPLUGIN_REDISCLUSTER_CREDISCLUSTERPUBSUBCLIENT_H
  #endif /* PUBSUBPLUGIN_REDISCLUSTER_CREDISCLUSTERPUBSUBCLIENT_H ? */
  
  #include "pubsubpluginREDISCLUSTER.h"
  
  /*-------------------------------------------------------------------------//
  //                                                                         //
  //      NAMESPACE                                                          //
  //                                                                         //
  //-------------------------------------------------------------------------*/
  
  namespace GUCEF {
  namespace PUBSUBPLUGIN {
  namespace REDISCLUSTER {
  
  /*-------------------------------------------------------------------------//
  //                                                                         //
  //      TYPES                                                              //
  //                                                                         //
  //-------------------------------------------------------------------------*/
  
  typedef CORE::CTFactoryWithParam< COMCORE::CPubSubClient, CRedisClusterPubSubClient, COMCORE::CPubSubClientConfig >    TRedisClusterPubSubClientFactory;
  
  /*-------------------------------------------------------------------------//
  //                                                                         //
  //      GLOBAL VARS                                                        //
  //                                                                         //
  //-------------------------------------------------------------------------*/
  
  TRedisClusterPubSubClientFactory g_redisClusterPubSubClientFactory;
  
  /*-------------------------------------------------------------------------//
  //                                                                         //
  //      IMPLEMENTATION                                                     //
  //                                                                         //
  //-------------------------------------------------------------------------*/
  
  CORE::Int32 GUCEF_PLUGIN_CALLSPEC_PREFIX
  GUCEFPlugin_Load( CORE::UInt32 argc, const char** argv ) GUCEF_PLUGIN_CALLSPEC_SUFFIX
  {GUCEF_TRACE;
  
      GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "Load called on COMCORE pubsub plugin REDISCLUSTER" );
      
      COMCORE::CComCoreGlobal::Instance()->GetPubSubClientFactory().RegisterConcreteFactory( CRedisClusterPubSubClient::TypeName, &g_redisClusterPubSubClientFactory );
      
      GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "Load finished for COMCORE pubsub plugin REDISCLUSTER" );
      return 1;
  }
  
  /*--------------------------------------------------------------------------*/
  
  void GUCEF_PLUGIN_CALLSPEC_PREFIX
  GUCEFPlugin_Unload( void ) GUCEF_PLUGIN_CALLSPEC_SUFFIX
  {GUCEF_TRACE;
  
      GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "Unload called on COMCORE pubsub plugin REDISCLUSTER" );
  
      COMCORE::CComCoreGlobal::Instance()->GetPubSubClientFactory().UnregisterConcreteFactory( CRedisClusterPubSubClient::TypeName );
  
      GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "Unload finished for COMCORE pubsub plugin REDISCLUSTER" );
  }
  
  /*--------------------------------------------------------------------------*/
  
  void GUCEF_PLUGIN_CALLSPEC_PREFIX
  GUCEFPlugin_GetVersion( CORE::TVersion* versionInfo ) GUCEF_PLUGIN_CALLSPEC_SUFFIX
  {GUCEF_TRACE;
  
      if ( GUCEF_NULL != versionInfo )
      {
          versionInfo->major = 0;
          versionInfo->minor = 0;
          versionInfo->patch = 0;
          versionInfo->release = 0;
      }
  }
  
  /*--------------------------------------------------------------------------*/
  
  const char* GUCEF_PLUGIN_CALLSPEC_PREFIX
  GUCEFPlugin_GetCopyright( void ) GUCEF_PLUGIN_CALLSPEC_SUFFIX
  {GUCEF_TRACE;
  
      return "Copyright (C) Dinand Vanvelzen, Apache License v2";
  }
  
  /*--------------------------------------------------------------------------*/
  
  const char* GUCEF_PLUGIN_CALLSPEC_PREFIX
  GUCEFPlugin_GetDescription( void ) GUCEF_PLUGIN_CALLSPEC_SUFFIX
  {GUCEF_TRACE;
  
      return "Generic GUCEF plugin for COMCORE \"Clustered Redis\" pubsub connectivity";
  }
  
  /*-------------------------------------------------------------------------//
  //                                                                         //
  //      NAMESPACE                                                          //
  //                                                                         //
  //-------------------------------------------------------------------------*/
  
  }; /* namespace REDISCLUSTER */
  }; /* namespace PUBSUBPLUGIN */
  }; /* namespace GUCEF */
  
  /*--------------------------------------------------------------------------*/
  