This file is indexed.

/usr/include/terralib/kernel/TeDBConnectionsPool.h is in libterralib-dev 4.3.0+dfsg.2-11.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef TDK_DB_CONNECTIONSPOOL_H
#define TDK_DB_CONNECTIONSPOOL_H

//STL include files
#include <iostream>
#include <map>
#include <string>
#include <vector>

//TerraLib include files
#include <TeSingleton.h>
#include <TeDatabaseFactoryParams.h>
#include <TeException.h>

//foward declarations
class TeDatabase;

class TL_DLL TeDBConnectionsPool : public TeSingleton<TeDBConnectionsPool>
{
public:

	~TeDBConnectionsPool();

	TeDatabase* getDatabase(std::string& dbmsName, std::string& dbName, 
                            std::string& host, std::string& user, 
                            std::string& passwd, int& portNumber);

public:

    TeDatabase* getDatabase(const int& dbIdx);

    int getDatabaseIdx(TeDatabase* db);

	void clear();

    void saveExternalDBConnection(TeDatabase* mainDb, TeDatabase* externalDb);

	void loadExternalDBConnections(TeDatabase* mainDb);

	void deleteExternalDBConnection(TeDatabase* mainDb, const int& externalDbId);

	std::vector<int> getConnectionsIdVector();

    static void createDBConnectionTable(TeDatabase* db);

	bool getConnectionInfo(TeDatabase* mainDb, 
									const int& connId, 
									std::string& hostName, 
									std::string& dbmsName, 
									std::string& dbName, 
									std::string& userName, 
									std::string& password, 
									int& port);

private:

	void insertDatabase(TeDatabase* db, const int& dbId);

	void removeDatabase(const int& dbId);

	std::string getDbKey(const TeDatabaseFactoryParams& dbParams) const;

	void verifyDbParams(std::string& dbmsName, std::string& dbName, 
								  std::string& host, std::string& user, 
								  std::string& passwd, int& portNumber);

	TeDatabaseFactoryParams asFactoryParams(const std::string& dbmsName, 
											const std::string& dbName, 
											const std::string& host, const std::string& user, 
											const std::string& passwd, const int& portNumber);

    std::map<std::string, int> _dbConns;
    std::map<int, TeDatabase*> _dbs;
};

#endif //TDK_DB_CONNECTIONSPOOL_H