Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Public Attributes | Protected Attributes
Arc::MCCConfig Class Reference

#include <MCC.h>

Inheritance diagram for Arc::MCCConfig:
Inheritance graph
[legend]
Collaboration diagram for Arc::MCCConfig:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MCCConfig ()
virtual ~MCCConfig ()
virtual XMLNode MakeConfig (XMLNode cfg) const
 Adds configuration part corresponding to stored information into common configuration tree supplied in 'cfg' argument.
void AddPluginsPath (const std::string &path)
 Adds non-standard location of plugins.
void AddPrivateKey (const std::string &path)
 Add private key.
void AddCertificate (const std::string &path)
 Add certificate.
void AddProxy (const std::string &path)
 Add credentials proxy.
void AddCAFile (const std::string &path)
 Add CA file.
void AddCADir (const std::string &path)
 Add CA directory.
void AddOverlay (XMLNode cfg)
 Add configuration overlay.
void GetOverlay (std::string fname)
 Read overlay from file.

Public Attributes

std::string key
std::string cert
std::string proxy
std::string cafile
std::string cadir
XMLNode overlay

Protected Attributes

std::list< std::string > plugin_paths

Detailed Description

Definition at line 109 of file MCC.h.


Constructor & Destructor Documentation

Definition at line 112 of file MCC.h.

      : BaseConfig() {}
virtual Arc::MCCConfig::~MCCConfig ( ) [inline, virtual]

Definition at line 114 of file MCC.h.

{}

Member Function Documentation

void Arc::BaseConfig::AddCADir ( const std::string &  path) [inherited]

Add CA directory.

Definition at line 120 of file ArcConfig.cpp.

                                                 {
    cadir = path;
  }

Here is the caller graph for this function:

void Arc::BaseConfig::AddCAFile ( const std::string &  path) [inherited]

Add CA file.

Definition at line 116 of file ArcConfig.cpp.

                                                  {
    cafile = path;
  }

Here is the caller graph for this function:

void Arc::BaseConfig::AddCertificate ( const std::string &  path) [inherited]

Add certificate.

Definition at line 108 of file ArcConfig.cpp.

                                                       {
    cert = path;
  }

Here is the caller graph for this function:

void Arc::BaseConfig::AddOverlay ( XMLNode  cfg) [inherited]

Add configuration overlay.

Definition at line 124 of file ArcConfig.cpp.

Here is the call graph for this function:

void Arc::BaseConfig::AddPluginsPath ( const std::string &  path) [inherited]

Adds non-standard location of plugins.

Definition at line 92 of file ArcConfig.cpp.

                                                       {
    plugin_paths.push_back(path);
  }

Here is the caller graph for this function:

void Arc::BaseConfig::AddPrivateKey ( const std::string &  path) [inherited]

Add private key.

Definition at line 104 of file ArcConfig.cpp.

                                                      {
    key = path;
  }

Here is the caller graph for this function:

void Arc::BaseConfig::AddProxy ( const std::string &  path) [inherited]

Add credentials proxy.

Definition at line 112 of file ArcConfig.cpp.

                                                 {
    proxy = path;
  }

Here is the caller graph for this function:

void Arc::BaseConfig::GetOverlay ( std::string  fname) [inherited]

Read overlay from file.

Definition at line 129 of file ArcConfig.cpp.

                                             {
    overlay.Destroy();
    if (fname.empty())
      return;
    overlay.ReadFromFile(fname);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

XMLNode Arc::MCCConfig::MakeConfig ( XMLNode  cfg) const [virtual]

Adds configuration part corresponding to stored information into common configuration tree supplied in 'cfg' argument.

Returns reference to XML node representing configuration of ModuleManager

Reimplemented from Arc::BaseConfig.

Definition at line 84 of file MCC.cpp.

                                                 {
    XMLNode mm = BaseConfig::MakeConfig(cfg);
    std::list<std::string> mccs;
    for (std::list<std::string>::const_iterator path = plugin_paths.begin();
         path != plugin_paths.end(); path++) {
      try {
        Glib::Dir dir(*path);
        for (Glib::DirIterator file = dir.begin(); file != dir.end(); file++) {
          if ((*file).substr(0, 6) == "libmcc") {
            std::string name = (*file).substr(6, (*file).find('.') - 6);
            if (std::find(mccs.begin(), mccs.end(), name) == mccs.end()) {
              mccs.push_back(name);
              cfg.NewChild("Plugins").NewChild("Name") = "mcc" + name;
            }
          }
          //Since the security handler could also be used by mcc like
          // tls and soap, putting the libarcshc here. Here we suppose
          // all of the sec handlers are put in libarcshc
          // TODO: Rewrite it to behave in generic way.
          //if ((*file).substr(0, 9) == "libarcshc") {
          //  cfg.NewChild("Plugins").NewChild("Name") = "arcshc";
          //}
        }
      }
      catch (Glib::FileError) {}
    }
    return mm;
  }

Here is the call graph for this function:


Member Data Documentation

std::string Arc::BaseConfig::cadir [inherited]

Definition at line 81 of file ArcConfig.h.

std::string Arc::BaseConfig::cafile [inherited]

Definition at line 80 of file ArcConfig.h.

std::string Arc::BaseConfig::cert [inherited]

Definition at line 78 of file ArcConfig.h.

std::string Arc::BaseConfig::key [inherited]

Definition at line 77 of file ArcConfig.h.

Definition at line 82 of file ArcConfig.h.

std::list<std::string> Arc::BaseConfig::plugin_paths [protected, inherited]

Definition at line 75 of file ArcConfig.h.

std::string Arc::BaseConfig::proxy [inherited]

Definition at line 79 of file ArcConfig.h.


The documentation for this class was generated from the following files: