Referência ao ficheiro src/vapiIOXML.h

Este grafo mostra quais são os ficheiros que incluem directamente ou indirectamente este ficheiro:

Ir para o código fonte deste ficheiro.

Funções

void vapiIOConfiguredListFromXML ()
void vapiIOConfiguredToXML ()


Documentação das funções

void vapiIOConfiguredListFromXML (  ) 

Definido na linha 98 do ficheiro vapiIOXML.c.

Referências GlobalIOList, _vIO::OptionsSettings, v_debug, v_info(), vapiIOListConfiguredAdd(), vapiIOListSelect(), vapiOptionsCheck(), vapiOptionsInit(), vapiOptionsXMLSetOptions() e vapiXMLNextElement().

Referenciado por main().

00099 {
00100         char *filename = "vapiIOconf.vpi";
00101         xmlTextReader *xmlInput;
00102         vIO *tempIO;
00103         vOptions *tempOptions;
00104         int ret = 1;
00105         xmlInput = xmlReaderForFile (filename, "ISO-8859-1", XML_PARSE_DTDATTR |        /* default DTD attributes */
00106                                      XML_PARSE_NOENT |  /* substitute entities */
00107                                      XML_PARSE_DTDVALID);       /* validate with the DTD */
00108         
00109         if (xmlInput==NULL)
00110         {
00111                 return;
00112         }
00113         
00114         xmlTextReaderRead (xmlInput);
00115         if (!strcmp
00116             ((char *) xmlTextReaderLocalName (xmlInput),
00117              "vapiCommunications "))
00118         {
00119                 v_debug ("não é ficheiro de comunicações");
00120                 return;
00121         }
00122         v_debug ("nome do tipo de xml detectado: %s",(char *) xmlTextReaderLocalName (xmlInput)); 
00123         
00124         xmlTextReaderRead (xmlInput);
00125         /*
00126          * Entramos nos IO's.
00127          */
00128         if (vapiXMLNextElement (xmlInput) > 0)
00129         {
00130                 if (strcmp
00131                     ((char *) xmlTextReaderLocalName (xmlInput),
00132                      "IOConfigured"))
00133                 {
00134                         v_debug ("não tem um io configured, tem: %s", (char *) xmlTextReaderLocalName (xmlInput));
00135                         return;
00136                 }
00137 
00138                 while (ret > 0)
00139                 {
00140                         tempIO = vapiIOListSelect (GlobalIOList,
00141                                                    (char *)
00142                                                    xmlTextReaderGetAttribute
00143                                                    (xmlInput,
00144                                                     BAD_CAST "name"));
00145                         v_debug ("IO name: %s",
00146                                  xmlTextReaderGetAttribute (xmlInput,
00147                                                             BAD_CAST "name"));
00148 
00149                         tempOptions =
00150                                 vapiOptionsInit (tempIO->OptionsSettings);
00151                         
00152                         //vapiXMLNextElement (xmlInput);
00153 
00154                         vapiOptionsXMLSetOptions (xmlInput, tempOptions, NULL);
00155 
00156                         vapiIOListConfiguredAdd (tempIO, tempOptions);
00157 
00158                         ret = vapiXMLNextElement (xmlInput);
00159 
00160                         vapiOptionsCheck (tempIO->OptionsSettings,
00161                                           tempOptions);
00162 
00163                 }
00164 
00165         }
00166 
00167 
00168         v_info ("Carregada a List de Comunicações de xml");
00169 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiIOConfiguredToXML (  ) 

Definido na linha 44 do ficheiro vapiIOXML.c.

Referências GlobalIOListConfigured, _vIOConfigured::IO, _vIO::IOname, _vIOConfigured::Options, _vIO::OptionsSettings, v_info(), v_list_count_elements(), v_list_get(), vapiIOXMLFileInit() e vapiOptionsXMLGetOptions().

Referenciado por vapiGtkWindowIOAdd_Add(), vapiGtkWindowIOConfiguredRemove() e vapiGtkWindowIOConfiguredSaveChanges().

00045 {
00046         xmlTextWriter *xmlOutput;
00047         int i, ListSize;
00048         vIOConfigured *Item;
00049 
00050         /*
00051          * Criar cabeçalho do Ficheiro XML.
00052          */
00053 
00054         xmlOutput = vapiIOXMLFileInit ();
00055 
00056         /*
00057          * Ir a cada Operação da Macro.
00058          */
00059 
00060         ListSize = v_list_count_elements (GlobalIOListConfigured);
00061 
00062         if (!ListSize)
00063         {
00064                 return;
00065         }
00066 
00067         for (i = 0; i < ListSize; i++)
00068         {
00069                 Item = v_list_get (GlobalIOListConfigured, i);
00070 
00071                 xmlTextWriterStartElement (xmlOutput,
00072                                            BAD_CAST "IOConfigured");
00073 
00074                 xmlTextWriterWriteAttribute (xmlOutput, BAD_CAST "name",
00075                                              BAD_CAST Item->IO->IOname);
00076 
00077                 /*
00078                  * Get Options.
00079                  */
00080                 vapiOptionsXMLGetOptions (xmlOutput,
00081                                           Item->IO->OptionsSettings,
00082                                           Item->Options, NULL);
00083 
00084 
00085                 xmlTextWriterEndElement (xmlOutput);
00086 
00087         }
00088 
00089 
00090         xmlTextWriterEndDocument (xmlOutput);
00091 
00092         xmlFreeTextWriter (xmlOutput);
00093         v_info ("Guardada Lista de omunicações para xml");
00094 
00095 }

Grafo de chamadas desta função:

Here is the caller graph for this function:


Gerado em Tue Jul 24 10:38:11 2007 para Vapi por  doxygen 1.5.1