1/////////////////////////////////////////////////////////////////////////////
2//
3// Project: SMB kioslave for KDE
4//
5// File: Top level implementation file for kio_smb.cpp
6//
7// Abstract: member function implementations for SMBSlave
8//
9// Author(s): Matthew Peterson <mpeterson@caldera.com>
10//
11//---------------------------------------------------------------------------
12//
13// Copyright (c) 2000 Caldera Systems, Inc.
14//
15// This program is free software; you can redistribute it and/or modify it
16// under the terms of the GNU General Public License as published by the
17// Free Software Foundation; either version 2.1 of the License, or
18// (at your option) any later version.
19//
20// This program is distributed in the hope that it will be useful,
21// but WITHOUT ANY WARRANTY; without even the implied warranty of
22// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23// GNU Lesser General Public License for more details.
24//
25// You should have received a copy of the GNU General Public License
26// along with this program; see the file COPYING. If not, please obtain
27// a copy from http://www.gnu.org/copyleft/gpl.html
28//
29/////////////////////////////////////////////////////////////////////////////
30
31#include "kio_smb.h"
32#include "kio_smb_internal.h"
33#include <kcomponentdata.h>
34#include <QCoreApplication>
35
36//===========================================================================
37SMBSlave::SMBSlave(const QByteArray& pool, const QByteArray& app)
38 : SlaveBase( "smb", pool, app ), m_openFd(-1)
39{
40 m_initialized_smbc = false;
41
42 //read in the default workgroup info...
43 reparseConfiguration();
44
45 //initialize the library...
46 auth_initialize_smbc();
47}
48
49
50//===========================================================================
51SMBSlave::~SMBSlave()
52{
53}
54
55
56//===========================================================================
57int KDE_EXPORT kdemain( int argc, char **argv )
58{
59 QCoreApplication app(argc, argv);
60 KComponentData componentData("kio_smb");
61 if( argc != 4 )
62 {
63 kDebug(KIO_SMB) << "Usage: kio_smb protocol domain-socket1 domain-socket2"
64 << endl;
65 return -1;
66 }
67
68 SMBSlave slave( argv[2], argv[3] );
69
70 slave.dispatchLoop();
71
72 return 0;
73}
74
75