Commit f4f92d0236c4d9c8a5e59af3d06018323ce5d72d

Authored by Adriano Vieira
1 parent 20e94edd
Exists in master

Excluídos arquivos desnecessários


git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/agente-windows@1272 fecfc0c7-e812-0410-ae72-849f08638ee7
srcacic/WinVNC/WinVNC/CACIC_Utils.h.bak
... ... @@ -1,161 +0,0 @@
1   -/**
2   - * Copyright (C) 2009 DATAPREV-ES
3   - * @author Vinicius Avellar Moreira
4   - * Classe com alguns métodos utilitários.
5   - */
6   -
7   -#ifndef _CACIC_UTILS_
8   -#define _CACIC_UTILS_
9   -
10   -#include <string>
11   -using namespace std;
12   -
13   -#include "windows.h"
14   -
15   -/**
16   - * Struct referente a um usuário cliente.
17   - */
18   -struct ClienteSRC {
19   - short vncCID;
20   - string peerName;
21   - string id_usuario_visitante;
22   - string id_usuario_cli;
23   - string id_conexao;
24   - string nm_usuario_completo;
25   - string te_node_address_visitante;
26   - string te_node_address_cli;
27   - string te_documento_referencial;
28   - string te_motivo_conexao;
29   - string te_so_visitante;
30   - string te_so_cli;
31   - string dt_hr_inicio_sessao;
32   -};
33   -
34   -/**
35   - * Struct referente a um domínio de autenticação.
36   - */
37   -struct Dominio {
38   - Dominio(string p_id, string p_nome) : id(p_id), nome(p_nome) {}
39   - Dominio() : id(""), nome("") {}
40   - Dominio(const Dominio& d) : id(d.id), nome(d.nome) {}
41   - string id;
42   - string nome;
43   -};
44   -
45   -class CACIC_Utils {
46   -
47   -public:
48   -
49   - /** Fonte padrão usado nos diálogos. */
50   - static const string F_SANS_SERIF;
51   -
52   - /**
53   - * Método bruto para ler uma tag específica de um arquivo xml.
54   - * @param xml String no formato de arquivo xml.
55   - * @param tagname String com o nome da tag a ser pesquisada.
56   - * @param conteudo String com o conteúdo da tag pesquisada.
57   - * @trows CACIC_Exception caso a tag não seja encontrada.
58   - */
59   - static void leTag(char xml[], char tagname[], string &conteudo);
60   -
61   - /**
62   - * Troca caracteres específicos de uma string.
63   - * @param str String a ser modificada.
64   - * @param key String com o caractere ou conjunto de caracteres que serão substituídos.
65   - * @param newKey String com o caractere ou conjunto de caracteres que irão substituir.
66   - */
67   - static void replaceAll(string &str, string key, string newkey);
68   -
69   - /**
70   - * Codifica a string, removendo os caracteres especiais por %código dos mesmos.
71   - * @param decoded String que será codificada.
72   - */
73   - static void urlEncode(string &decoded);
74   -
75   - /**
76   - * Decodifica a string, retornando os códigos dos caracteres pelos próprios caracteres.
77   - * @param encoded String que será decodificada.
78   - */
79   - static void urlDecode(string &encoded);
80   -
81   - /**
82   - * Mesma função do urlEncode, porém os caracteres serão substituídos
83   - * por tags específicas, e não pelo código.
84   - * @param entrada String que será codificada.
85   - */
86   - static void simpleUrlEncode(string &entrada);
87   -
88   - /**
89   - * Faz o inverso do simpleUrlEncode, trocando as tags específicas pelos
90   - * respectivos caracteres.
91   - * @param entrada String que será codificada.
92   - */
93   - static void simpleUrlDecode(string &entrada);
94   -
95   - /**
96   - * Transforma o byte em codigo ascii, retornando o char correspondente.
97   - * @param first Primeiro hexa do caractere.
98   - * @param second Segundo hexa do caractere.
99   - * @return Char correspondente ao código ascci encontrado.
100   - */
101   - static char hexToAscii(char first, char second);
102   -
103   - /**
104   - * Retira os espaços em branco do começo e fim da string.
105   - * @param str String a ser modificada.
106   - */
107   - static void trim(string &str);
108   -
109   - /**
110   - * Método para alterar a fonte de um determinado elemento de um diálogo.
111   - * @param dlgHandle Handler do diálogo.
112   - * @param dlgItem Item do diálogo que terá a fonte trocada.
113   - * @param fontSize Tamanho da fonte.
114   - * @param fontName Nome da fonte.
115   - * @param fontIsBold Define o peso da fonte: true = bold, false = normal.
116   - */
117   - static void changeFont(HWND dlgHandle, int dlgItem,
118   - int fontSize, string fontName,
119   - bool fontIsBold = false);
120   -
121   - /**
122   - * Método para separar a string em partes delimitadas por um, ou um conjunto,
123   - * de caracteres.
124   - * @param str String a ser tokenizada.
125   - * @param tokens Vetor de saída dos tokens gerados.
126   - * @param delimiters Delimitadores que serão usados para separar a string.
127   - * @note http://www.linuxselfhelp.com/HOWTO/C++Programming-HOWTO-7.html
128   - */
129   - //static void tokenize(const string &str, vector<string> &tokens, const string &delimiters = " ");
130   -
131   - /**
132   - * Obtém o MAC Address da placa de rede.<br />
133   - * TODO: Quando houver mais de uma placa de rede no pc, verificar qual
134   - * está se comunicando com o servidor para enviar o MAC certo.
135   - */
136   - static string getMACAddress();
137   -
138   - /**
139   - * Obtém a identificação do sistema operacional.<br />
140   - * Artigo sobre SOID:<br />
141   - * http://www.codeguru.com/cpp/w-p/system/systeminformation/article.php/c8973__2/
142   - */
143   - static string getSOID();
144   -
145   - /**
146   - * Função que compara Datas do sistema, atraves da função declarada
147   - * anteriormente: Compare.
148   - */
149   - static int DateCompare (SYSTEMTIME d1, SYSTEMTIME d2);
150   -
151   -private:
152   -
153   - /**
154   - * Este método virtual puro é um truque para que a classe
155   - * se torne abstrata e não possa ser instanciada.
156   - */
157   - virtual void cutils() = 0;
158   -
159   -};
160   -
161   -#endif
162 0 \ No newline at end of file
srcacic/WinVNC/WinVNC/vnclog.h.bak
... ... @@ -1,115 +0,0 @@
1   -// Copyright (C) 2002 RealVNC Ltd. All Rights Reserved.
2   -// Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
3   -//
4   -// This program is free software; you can redistribute it and/or modify
5   -// it under the terms of the GNU General Public License as published by
6   -// the Free Software Foundation; either version 2 of the License, or
7   -// (at your option) any later version.
8   -//
9   -// This program is distributed in the hope that it will be useful,
10   -// but WITHOUT ANY WARRANTY; without even the implied warranty of
11   -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   -// GNU General Public License for more details.
13   -//
14   -// You should have received a copy of the GNU General Public License
15   -// along with this program; if not, write to the Free Software
16   -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17   -// USA.
18   -//
19   -// If the source code for the program is not available from the place from
20   -// which you received this file, check http://www.realvnc.com/ or contact
21   -// the authors on info@realvnc.com for information on obtaining it.
22   -
23   -// This is an object and macros which provide general logging and debugging functions.
24   -// It can log to a file, to a new console, and/or to debug - others maybe to follow.
25   -// Every log object has a logging level (which can be changed).
26   -// Only log requests with a high enough level attached get logged. So the
27   -// level can be thought of as 'amount of detail'.
28   -// We use Unicode-portable stuff here for compatibility with WinCE.
29   -//
30   -// Typical use:
31   -//
32   -// Log log;
33   -// log.SetFile( _T("myapp.log") );
34   -// ...
35   -// log.Print(2, _T("x = %d\n"), x);
36   -//
37   -
38   -#ifndef VNCLOGGING
39   -#define VNCLOGGING
40   -
41   -#include <stdarg.h>
42   -#include <stdio.h>
43   -#include <time.h>
44   -
45   -#define SCRIPT "srcacic_set_session.php"
46   -
47   -#define SRVERSION "2.6.0.0"
48   -
49   -class VNCLog
50   -{
51   -public:
52   - // Logging mode flags:
53   - static const int ToDebug;
54   - static const int ToFile;
55   - static const int ToConsole;
56   - static const int ToScript;
57   -
58   - // Create a new log object.
59   - // Parameters as follows:
60   - // mode - specifies where output should go, using combination
61   - // of flags above.
62   - // level - the default level
63   - // filename - if flag Log::ToFile is specified in the type,
64   - // a filename must be specified here.
65   - // append - if logging to a file, whether or not to append to any
66   - // existing log.
67   - VNCLog();
68   -
69   - inline void Print(int level, const char* format, ...) {
70   - if (level > m_level) return;
71   - va_list ap;
72   - va_start(ap, format);
73   - ReallyPrint(format, ap);
74   - va_end(ap);
75   - }
76   -
77   - // Change the log level
78   - void SetLevel(int level);
79   - int GetLevel() const {return m_level;};
80   -
81   - // Change the logging mode
82   - void SetMode(int mode);
83   - int GetMode() const {return m_mode;};
84   -
85   - // Change or set the logging filename. This only has an effect if
86   - // the log mode includes ToFile
87   - void SetFile(const char* filename, bool append = false);
88   -
89   - /** Verifica a existencia do diretorio debugs em "..\Temp\debugs.*/
90   - bool IsDebugModeON();
91   -
92   - virtual ~VNCLog();
93   - string SRVersion(){return SRVERSION;};
94   -
95   - virtual ~VNCLog();
96   -
97   -private:
98   - void ReallyPrintLine(const char* line);
99   - void ReallyPrint(const char* format, va_list ap);
100   - void OpenFile();
101   - void CloseFile();
102   - bool m_tofile, m_todebug, m_toconsole, m_toscript;
103   - int m_mode;
104   - int m_level;
105   - HANDLE hlogfile;
106   - LPSTR m_filename;
107   - bool m_append;
108   -
109   - time_t m_lastLogTime;
110   - void GetLastErrorMsg(LPSTR szErrorMsg) const;
111   -
112   - void enviaLog(char data[], char log[], char script[]);
113   -};
114   -
115   -#endif // VNCLOGGING