summaryrefslogtreecommitdiffstats
path: root/src/tdebluezioclient/main.cpp
blob: 74284070d984838eb657f3037a1e63480b1bd232 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//-*-c++-*-
/***************************************************************************
 *   Copyright (C) 2003 by Fred Schaettgen                                 *
 *   kdebluetooth@schaettgen.de                                            *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/

#include <tdeapplication.h>
#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
#include <tdelocale.h>
#include <kurl.h>
#include <tqwidget.h>

#include "commandhandler.h"

static const char description[] =
        I18N_NOOP("TDEIO command line client for tdebluez");

//FIXME static const char* version = TDEBluetoothConfig::version;

static const char* version = "0.0.1";

static TDECmdLineOptions options[] =
{
        {"d", 0, 0}, {"date", I18N_NOOP("List date"), 0},
        {"u", 0, 0}, {"user", I18N_NOOP("List user"), 0},
        {"i", 0, 0}, {"iconName", I18N_NOOP("List icon name"), 0},
        {"g", 0, 0}, {"group", I18N_NOOP("List group"), 0},
        {"extra", I18N_NOOP("List extra"), 0},
        {"noname", I18N_NOOP("Do not list name"), 0},
        {"p", 0, 0}, {"access", I18N_NOOP("List access permissions"), 0},
        {"m", 0, 0}, {"mtime", I18N_NOOP("List modification time"), 0},
        {"a", 0, 0}, {"atime", I18N_NOOP("List access time"), 0},
        {"c", 0, 0}, {"ctime", I18N_NOOP("List creation time"), 0},
        {"f", 0, 0}, {"filetype", I18N_NOOP("List file type"), 0},
        {"D", 0, 0}, {"linkdest", I18N_NOOP("List link destination"), 0},
        {"U", 0, 0}, {"url", I18N_NOOP("List URL"), 0},
        {"M", 0, 0}, {"mimetype", I18N_NOOP("List mime type"), 0},
        {"G", 0, 0}, {"guessedmimetype", I18N_NOOP("List guessed mime type"), 0},
        {"X", 0, 0}, {"xmlproperties", I18N_NOOP("List XML properties"), 0},
        {"s", 0, 0}, {"size", I18N_NOOP("List size"), 0},
        {"outfile [filename]", I18N_NOOP("Output file. Defaults to stdout"), 0},
        {"infile [filename]", I18N_NOOP("Input file. Defaults to stdin"), 0},
        {"progresswindow", I18N_NOOP("Show a progress window"), 0},
        {"nooverwrite", I18N_NOOP("Ask (graphically) before overwriting files"), 0},
        {"messages", I18N_NOOP("Show messages from the tdeioslave"), 0},
        {"+[cmd]", I18N_NOOP("Command (ls, cat, put, cp, rm, mv, mkdir, rmdir)"), 0 },
        TDECmdLineLastOption
};

int main(int argc, char **argv)
{
    TDELocale::setMainCatalogue("tdebluez");
    TDEAboutData about("tdebluezioclient",
            I18N_NOOP("tdeio client for tdebluez"),
            version, description,
            TDEAboutData::License_GPL,
            "(C) 2004 Fred Schaettgen", 0, 0,
            "kdebluetooth@schaettgen.de");
    about.addAuthor("Emanoil Kotsev", I18N_NOOP("Bluez5 and port to TDE"), "deloptes@gmail.com");
    TDECmdLineArgs::init(argc, argv, &about);
    TDECmdLineArgs::addCmdLineOptions(options);
    TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
    TDEApplication app;

    CommandHandler commandHandler(args);
    commandHandler.start();
    return app.exec();
}