Back to index

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

Configuration for client interface. More...

#include <ArcConfig.h>

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

List of all members.

Public Member Functions

 BaseConfig ()
virtual ~BaseConfig ()
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.
virtual XMLNode MakeConfig (XMLNode cfg) const
 Adds configuration part corresponding to stored information into common configuration tree supplied in 'cfg' argument.

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

Configuration for client interface.

It contains information which can't be expressed in class constructor arguments. Most probably common things like software installation location, identity of user, etc.

Definition at line 73 of file ArcConfig.h.


Constructor & Destructor Documentation

Definition at line 70 of file ArcConfig.cpp.

                         {
    if (getenv("ARC_PLUGIN_PATH")) {
      std::string arcpluginpath = getenv("ARC_PLUGIN_PATH");
      std::string::size_type pos = 0;
      while (pos != std::string::npos) {
        std::string::size_type pos2 = arcpluginpath.find(G_SEARCHPATH_SEPARATOR, pos);
        AddPluginsPath(pos2 == std::string::npos ?
                       arcpluginpath.substr(pos) :
                       arcpluginpath.substr(pos, pos2 - pos));
        pos = pos2;
        if (pos != std::string::npos)
          pos++;
      }
    }
    else
#ifdef WIN32
      AddPluginsPath(ArcLocation::Get() + "\\lib\\arc");
#else
      AddPluginsPath(ArcLocation::Get() + G_DIR_SEPARATOR_S + PKGLIBSUBDIR);
#endif
  }

Here is the call graph for this function:

virtual Arc::BaseConfig::~BaseConfig ( ) [inline, virtual]

Definition at line 84 of file ArcConfig.h.

{}

Member Function Documentation

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

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)

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)

Add certificate.

Definition at line 108 of file ArcConfig.cpp.

                                                       {
    cert = path;
  }

Here is the caller graph for this function:

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)

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)

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)

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)

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::BaseConfig::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 in Arc::MCCConfig.

Definition at line 96 of file ArcConfig.cpp.

                                                  {
    XMLNode mm = cfg.NewChild("ModuleManager");
    for (std::list<std::string>::const_iterator p = plugin_paths.begin();
         p != plugin_paths.end(); ++p)
      mm.NewChild("Path") = *p;
    return mm;
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 81 of file ArcConfig.h.

Definition at line 80 of file ArcConfig.h.

std::string Arc::BaseConfig::cert

Definition at line 78 of file ArcConfig.h.

std::string Arc::BaseConfig::key

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]

Definition at line 75 of file ArcConfig.h.

Definition at line 79 of file ArcConfig.h.


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