1/*
2 * Copyright 2016-2017, Dario Casalinuovo. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6#include <Application.h>
7
8#include <stdio.h>
9#include <string.h>
10
11#include "MediaPlay.h"
12#include "MediaTest.h"
13
14
15void print_usage()
16{
17	printf("Usage:\n");
18	printf("  media_client play <uri>\n");
19	printf("  media_client test\n");
20}
21
22
23int main(int argc, char *argv[])
24{
25	if (argc < 2) {
26		print_usage();
27		return 0;
28	}
29
30	BApplication* app = new BApplication(
31		"application/x-vnd.Haiku-media_client");
32
33	int ret = 0;
34	if (strcmp(argv[1], "play") == 0) {
35		if (argc < 3) {
36			print_usage();
37		} else
38			ret = media_play(argv[2]);
39	} else if (strcmp(argv[1], "test") == 0)
40		media_test();
41	else
42		print_usage();
43
44	return ret;
45}
46