btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / bin / media_client / media_client.cpp
blob8a4900aa3d742793e322a5a9e474fa3a0b37c2d7
1 /*
2 * Copyright 2016-2017, Dario Casalinuovo. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
6 #include <Application.h>
8 #include <stdio.h>
9 #include <string.h>
11 #include "MediaPlay.h"
12 #include "MediaTest.h"
15 void print_usage()
17 printf("Usage:\n");
18 printf(" media_client play <uri>\n");
19 printf(" media_client test\n");
23 int main(int argc, char *argv[])
25 if (argc < 2) {
26 print_usage();
27 return 0;
30 BApplication* app = new BApplication(
31 "application/x-vnd.Haiku-media_client");
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();
44 return ret;