00001 /* 00002 InfoPoints.hpp 00003 part Of openForms base code for sign in and connectivity configuration 00004 ------------------ 00005 (C) W3systems 2007 00006 David McCombs davidmc@w3sys.com 00007 */ 00008 #include "ocFileSys.h" 00009 #include "ocXML.h" 00010 class infoPoints { 00011 public: 00012 string idToken; 00013 string authPoint; 00014 string cmsPoint; 00015 string appPoint; 00016 infoPoints() 00017 { 00018 // see if we have an accessPoints.xml file 00019 string accessPointsFileName = "accessPoints.xml"; 00020 ocFileSys ocFS; 00021 if( ocFS.is( accessPointsFileName ) ) 00022 { 00023 ifstream accessPointsFile( accessPointsFileName.c_str() ); 00024 if( accessPointsFile ) 00025 { 00026 xmlParser parser( &accessPointsFile ); 00027 parser.parse(); 00028 node_map::iterator it; 00029 it = parser.states.nodemap.find("idToken"); 00030 if( it != parser.states.nodemap.end() ) 00031 { 00032 idToken = parser.states.nodes[it->second].data; 00033 } 00034 it = parser.states.nodemap.find("authPoint"); 00035 if( it != parser.states.nodemap.end() ) 00036 { 00037 authPoint = parser.states.nodes[it->second].data; 00038 } 00039 it = parser.states.nodemap.find("cmsPoint"); 00040 if( it != parser.states.nodemap.end() ) 00041 { 00042 cmsPoint = parser.states.nodes[it->second].data; 00043 } 00044 it = parser.states.nodemap.find("appPoint"); 00045 if( it != parser.states.nodemap.end() ) 00046 { 00047 appPoint = parser.states.nodes[it->second].data; 00048 } 00049 } 00050 } 00051 } 00052 };
1.5.5