• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kremotecontrol

  • sources
  • kde-4.12
  • kdeutils
  • kremotecontrol
  • libkremotecontrol
profileserver.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 Michael Zanetti <michael_zanetti@gmx.net>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 
18 */
19 
20 #ifndef PROFILESERVER_H
21 #define PROFILESERVER_H
22 
23 #include "profile.h"
24 #include "remote.h"
25 #include "kremotecontrol_export.h"
26 
27 #include <QtXml/QXmlDefaultHandler>
28 #include <QtXml/QDomDocument>
29 #include <QtXmlPatterns/QAbstractMessageHandler>
30 #include <QtXmlPatterns/QXmlSchema>
31 
32 namespace ProfileServer
33 {
34 
35  enum ProfileSupportedByRemote {
36  FULL_SUPPORTED,
37  PARTIAL_SUPPORTED,
38  NOT_SUPPORTED,
39  NO_ACTIONS_DEFINED
40  };
41 
42  void addProfile(Profile* profile);
43 
44  QList<Profile*> allProfiles();
45  Profile* profile(const QString& profileId);
46  QList<ProfileActionTemplate> actionTemplateList(const QString &remote, Profile *profile);
47  ProfileServer::ProfileSupportedByRemote isProfileAvailableForRemote(Profile *profile, const Remote &remote);
48 
49  class ProfileXmlContentHandler: public QAbstractMessageHandler
50  {
51 
52  private:
53  ProfileActionTemplate parseAction(QDomNode actionNode, const QString& profileId);
54  QXmlSchema *m_schema;
55 
56  Profile m_currentProfile;
57  public:
58  ProfileXmlContentHandler(const QUrl& schema);
59  ~ProfileXmlContentHandler();
60  bool validateFile(const QString& fileName);
61  Profile *parseFile(const QString& fileName);
62  QList<Profile*> loadProfilesFromFiles(const QStringList& files);
63 
64  protected:
65  virtual void handleMessage(QtMsgType type, const QString &description, const QUrl &identifier, const QSourceLocation &sourceLocation);
66 
67  };
68 }
69 
70 #endif // PROFILESERVER_H
ProfileServer::ProfileXmlContentHandler::validateFile
bool validateFile(const QString &fileName)
Definition: profileserver.cpp:127
ProfileActionTemplate
Definition: profileactiontemplate.h:31
kremotecontrol_export.h
ProfileServer::FULL_SUPPORTED
Definition: profileserver.h:36
ProfileServer::ProfileXmlContentHandler::ProfileXmlContentHandler
ProfileXmlContentHandler(const QUrl &schema)
Definition: profileserver.cpp:117
ProfileServer::ProfileXmlContentHandler
Definition: profileserver.h:49
ProfileServer::allProfiles
QList< Profile * > allProfiles()
Definition: profileserver.cpp:89
ProfileServer::ProfileSupportedByRemote
ProfileSupportedByRemote
Definition: profileserver.h:35
ProfileServer::ProfileXmlContentHandler::~ProfileXmlContentHandler
~ProfileXmlContentHandler()
Definition: profileserver.cpp:123
ProfileServer::ProfileXmlContentHandler::handleMessage
virtual void handleMessage(QtMsgType type, const QString &description, const QUrl &identifier, const QSourceLocation &sourceLocation)
Definition: profileserver.cpp:136
ProfileServer::NOT_SUPPORTED
Definition: profileserver.h:38
ProfileServer::addProfile
void addProfile(Profile *profile)
Definition: profileserver.cpp:85
ProfileServer::isProfileAvailableForRemote
ProfileServer::ProfileSupportedByRemote isProfileAvailableForRemote(Profile *profile, const Remote &remote)
Definition: profileserver.cpp:145
QAbstractMessageHandler
ProfileServer::ProfileXmlContentHandler::loadProfilesFromFiles
QList< Profile * > loadProfilesFromFiles(const QStringList &files)
Definition: profileserver.cpp:178
ProfileServer::NO_ACTIONS_DEFINED
Definition: profileserver.h:39
ProfileServer::ProfileXmlContentHandler::parseFile
Profile * parseFile(const QString &fileName)
Definition: profileserver.cpp:191
remote.h
profile.h
ProfileServer::profile
Profile * profile(const QString &profileId)
Definition: profileserver.cpp:93
ProfileServer::PARTIAL_SUPPORTED
Definition: profileserver.h:37
Profile
Definition: profile.h:26
Remote
Definition: remote.h:32
ProfileServer::actionTemplateList
QList< ProfileActionTemplate > actionTemplateList(const QString &remote, Profile *profile)
Definition: profileserver.cpp:103
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kremotecontrol

Skip menu "kremotecontrol"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal