summaryrefslogtreecommitdiffstats
path: root/src/main.c
blob: cd35da66b949843c5697f27f3687c0fd92cc0bde (plain) (blame)
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
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <libwebsockets.h>
#include <lib.c>
#include <ui.c>
#include <api.c>
int main (int argc, char * argv[]) {
	struct dc_program * p = dc_program_init();
	struct dc_client * client = dc_client_init();
	lws_set_log_level(0xFF /* all message types */, NULL /* not change output location - cerr */);
	client->email = strdup(argv[1]);
	client->password = strdup(argv[2]);
	struct dc_api_io i = {
		.program = p,
		.type = DC_API_LOGIN,
		.client = client
	};
	dc_api_i(i);
	while (1)
		i = dc_api_o(i);
	/* dc_ui(argc, argv); */
	dc_program_free(p);
	return 0;
}