The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InstallSource Class Reference

#include <installmgr.h>

+ Collaboration diagram for InstallSource:

Public Member Functions

void flush ()
 
SWBuf getConfEnt ()
 
SWMgrgetMgr ()
 
 InstallSource (const char *type, const char *confEnt=0)
 
virtual ~InstallSource ()
 

Public Attributes

SWBuf caption
 
SWBuf directory
 
SWBuf localShadow
 
SWBuf p
 
SWBuf source
 
SWBuf type
 
SWBuf u
 
SWBuf uid
 
void * userData
 

Private Attributes

SWMgrmgr
 

Detailed Description

A remote installation source configuration

Definition at line 42 of file installmgr.h.

Constructor & Destructor Documentation

InstallSource::InstallSource ( const char *  type,
const char *  confEnt = 0 
)

Definition at line 715 of file installmgr.cpp.

715  {
716  this->type = type;
717  mgr = 0;
718  userData = 0;
719  if (confEnt) {
720  SWBuf buf = confEnt;
721  caption = buf.stripPrefix('|', true);
722  source = buf.stripPrefix('|', true);
723  directory = buf.stripPrefix('|', true);
724  u = buf.stripPrefix('|', true);
725  p = buf.stripPrefix('|', true);
726  uid = buf.stripPrefix('|', true);
727 
728  if (!uid.length()) uid = source;
729 
731  }
732 }
Definition: swbuf.h:47
unsigned long length() const
Definition: swbuf.h:197
SWBuf source
Definition: installmgr.h:51
SWBuf caption
Definition: installmgr.h:50
void * userData
Definition: installmgr.h:59
static void removeTrailingSlash(SWBuf &buf)
Definition: installmgr.cpp:57
const char * stripPrefix(char separator, bool endOfStringAsSeparator=false)
Definition: swbuf.h:457
SWMgr * mgr
Definition: installmgr.h:43
SWBuf directory
Definition: installmgr.h:52
InstallSource::~InstallSource ( )
virtual

Definition at line 735 of file installmgr.cpp.

735  {
736  if (mgr)
737  delete mgr;
738 }
SWMgr * mgr
Definition: installmgr.h:43

Member Function Documentation

void InstallSource::flush ( )

Definition at line 741 of file installmgr.cpp.

741  {
742  if (mgr) {
743  delete mgr;
744  mgr = 0;
745  }
746 }
SWMgr * mgr
Definition: installmgr.h:43
SWBuf InstallSource::getConfEnt ( )
inline

Definition at line 47 of file installmgr.h.

47  {
48  return caption +"|" + source + "|" + directory + "|" + u + "|" + p + "|" + uid;
49  }
SWBuf source
Definition: installmgr.h:51
SWBuf caption
Definition: installmgr.h:50
SWBuf directory
Definition: installmgr.h:52
SWMgr * InstallSource::getMgr ( )

Definition at line 749 of file installmgr.cpp.

749  {
750  if (!mgr)
751  // ..., false = don't augment ~home directory.
752  mgr = new SWMgr(localShadow.c_str(), true, 0, false, false);
753  return mgr;
754 }
Definition: swmgr.h:93
const char * c_str() const
Definition: swbuf.h:158
SWBuf localShadow
Definition: installmgr.h:58
SWMgr * mgr
Definition: installmgr.h:43

Member Data Documentation

SWBuf InstallSource::caption

Definition at line 50 of file installmgr.h.

SWBuf InstallSource::directory

Definition at line 52 of file installmgr.h.

SWBuf InstallSource::localShadow

Definition at line 58 of file installmgr.h.

SWMgr* InstallSource::mgr
private

Definition at line 43 of file installmgr.h.

SWBuf InstallSource::p

Definition at line 54 of file installmgr.h.

SWBuf InstallSource::source

Definition at line 51 of file installmgr.h.

SWBuf InstallSource::type

Definition at line 57 of file installmgr.h.

SWBuf InstallSource::u

Definition at line 53 of file installmgr.h.

SWBuf InstallSource::uid

Definition at line 55 of file installmgr.h.

void* InstallSource::userData

Definition at line 59 of file installmgr.h.


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