• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

qca

clientplugin.cpp

Go to the documentation of this file.
00001 
00026 #include <QtCrypto>
00027 #include <QtTest/QtTest>
00028 
00029 class ClientPlugin : public QObject
00030 {
00031     Q_OBJECT
00032 
00033 private slots:
00034     void initTestCase();
00035     void cleanupTestCase();
00036     void testInsertPlugin();
00037 
00038 private:
00039     QCA::Initializer* m_init;
00040 
00041 };
00042 
00043 void ClientPlugin::initTestCase()
00044 {
00045     m_init = new QCA::Initializer;
00046 #include "../fixpaths.include"
00047 }
00048 
00049 void ClientPlugin::cleanupTestCase()
00050 {
00051     delete m_init;
00052 }
00053 
00054 class TestClientProvider : public QCA::Provider
00055 {
00056 public:
00057         int qcaVersion() const
00058         {
00059                 return QCA_VERSION;
00060         }
00061 
00062         QString name() const
00063         {
00064                 return "testClientSideProvider";
00065         }
00066 
00067         QStringList features() const
00068         {
00069                 QStringList list;
00070                 list += "testClientSideProviderFeature1";
00071                 list += "testClientSideProviderFeature2";
00072                 return list;
00073         }
00074 
00075         Provider::Context *createContext(const QString &type)
00076         {
00077             if(type == "testClientSideProviderFeature1")
00078                 // return new Feature1Context(this);
00079         return 0;
00080             else if (type == "testClientSideProviderFeature2")
00081         //  return new Feature2Context(this);
00082         return 0;
00083             else
00084                 return 0;
00085         }
00086 };
00087 
00088 void ClientPlugin::testInsertPlugin()
00089 {
00090     QCA::insertProvider(new TestClientProvider, 0);
00091 }
00092 
00093 QTEST_MAIN(ClientPlugin)
00094 
00095 #include "clientplugin.moc"
00096 

qca

Skip menu "qca"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal