1 /***************************************************************************
2 * Copyright (C) 2007 by Jorge Cuadrado *
3 * kuadrosxx@gmail.com *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #include "packagehandlerbase.h"
22 #include <dcore/debug.h>
25 #include <QHashIterator>
28 #include "users/user.h"
30 #include "connection.h"
34 #include <dcore/applicationproperties.h>
36 #include "dash/network/package/error.h"
39 // #include "bans/banmanager.h"
40 // #include "backups/backupmanager.h"
44 namespace DashServer
{
46 struct PackageHandlerBase::Private
50 PackageHandlerBase::PackageHandlerBase() : d(new Private())
54 PackageHandlerBase::~PackageHandlerBase()
59 void PackageHandlerBase::handlePackage(DashServer::Package
*const pkg
)
61 DashServer::Connection
*cnn
= pkg
->source();
62 QString root
= pkg
->root();
63 QString package
= pkg
->xml();
65 dWarning("server") << "PACKAGE: " << package
;
67 TcpServer
*server
= cnn
->server();
68 if(!pkg
->isAccepted())
70 handle(cnn
, root
, package
);