-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmain.cpp
39 lines (34 loc) · 902 Bytes
/
main.cpp
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
#include <QCoreApplication>
#include <QtNetwork/QNetworkAccessManager>
#include <firebaseexamples.h>
#include <QString>
/*!
* \brief main Text some examples of using Firebase REST API
*
* \param argc Number of arguments
* \param argv 3 user arguments
* <ul>
* <li>Id of example to run</li>
* <li>Firebase Database URL</li>
* <li>Your Firebase Secret</li>
* </ul>
*
* \return
*/
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QString strId = "1";
if (argc >= 2)
strId = argv[1];
QString fbUrl;
if (argc >= 3)
fbUrl = argv[2];
QString authToken;
if (argc >= 4)
authToken = argv[3];
FirebaseExamples *examples = new FirebaseExamples(strId.toInt()
, fbUrl
, authToken);
return a.exec();
}