Add members to project
[dashstudio.git] / src / dashserver / project / project.h
blob2f1da8e18fe7fb118d41dc0e021b502bdbf7bcb7
1 /***************************************************************************
2 * Copyright (C) 2007 by David Cuadrado *
3 * krawek@gmail.com *
4 * *
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. *
9 * *
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. *
14 * *
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 ***************************************************************************/
22 #ifndef DASHSERVER_PROJECTPROJECT_H
23 #define DASHSERVER_PROJECTPROJECT_H
25 #include <dash/project.h>
26 #include <dashserver/xdbms/object.h>
27 #include <dashserver/exports.h>
29 namespace DashServer {
30 class Connection;
32 namespace Project {
33 class Member;
35 /**
36 @author David Cuadrado <krawek@gmail.com>
38 class DASHSERVER_EXPORT Project : public Dash::Project, public XDBMS::Object
40 public:
41 enum Part
43 None = 0x0,
44 All = 0x01,
45 Scene = 0x02,
46 Layer = 0x08,
47 Frame = 0x010,
48 Object = 0x20
51 Project(QObject *parent = 0);
52 ~Project();
54 void execute(const QString &xml, DashServer::Connection *source);
55 void addClient(DashServer::Connection *cnx);
56 void removeClient(DashServer::Connection *client);
58 void sendToClient(DashServer::Connection *client);
59 void sendToAll();
61 QSet<DashServer::Connection *> members() const;
63 int clientCount() const;
65 void keep();
66 void sync();
68 bool save();
69 bool load();
71 QString fileName() const;
73 void addMember(Member *member);
76 static QString partName(int part);
78 // FIXME: BORRAR
79 // QSet<QString> designers() const;
80 // void addDesigner(const QString &name);
81 //
82 // QSet<QString> owners() const;
83 // void addOwner(const QString &name);
85 private:
86 struct Private;
87 Private *const d;
93 #endif