• R/O
  • SSH
  • HTTPS

eirsamples: Commit


Commit MetaInfo

Revision6 (tree)
Time2018-04-27 07:36:39
Authorquiret

Log Message

- set marketstatcollect to use the latest C++ standard
- added gtaconfig and FileSystem vendor dependencies

Change Summary

Incremental Difference

--- marketstatcollect/src/main.cpp (revision 5)
+++ marketstatcollect/src/main.cpp (revision 6)
@@ -1,8 +1,47 @@
11 #include "StdInc.h"
22
3+#include <CFileSystem.h>
4+#include <gtaconfig/include.h>
5+
6+#include <iostream>
7+
38 int main( int argc, char *argv )
49 {
5- // TODO.
10+ std::cout <<
11+ "Marketing Data Collector by (c)Martin Turski, turningtides@outlook.de" << std::endl <<
12+ "put config.ini and sites.txt files into the application folder and run this tool" << std::endl <<
13+ std::endl;
614
15+ using namespace FileSystem;
16+
17+ // Initialize the FileSystem.
18+ fileSysInstance fsys_inst;
19+
20+ CFileTranslator *fileRoot = ::fileRoot;
21+
22+ // We first have to read some configuration about stuff.
23+ // Everyone should get their own configuration.
24+ std::string google_oauth;
25+ std::string bing_webapiKey;
26+ {
27+ filePtr configFile( fileRoot, "config.ini", "r" );
28+
29+ if ( configFile.is_good() )
30+ {
31+ CINI *config = LoadINI( configFile );
32+
33+ if ( config )
34+ {
35+ google_oauth = config->Get( "Google", "oauth" );
36+ bing_webapiKey = config->Get( "Bing", "webapiKey" );
37+
38+ delete config;
39+ }
40+ }
41+ }
42+
43+ // Initialize up networking.
44+ //TODO.
45+
746 return 0;
847 }
\ No newline at end of file
Show on old repository browser