svcore  1.9
PluginIdentifier.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     Sonic Visualiser
00005     An audio file viewer and annotation editor.
00006     Centre for Digital Music, Queen Mary, University of London.
00007     
00008     This program is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU General Public License as
00010     published by the Free Software Foundation; either version 2 of the
00011     License, or (at your option) any later version.  See the file
00012     COPYING included with this distribution for more information.
00013 */
00014 
00015 /*
00016    This is a modified version of a source file from the 
00017    Rosegarden MIDI and audio sequencer and notation editor.
00018    This file copyright 2000-2006 Chris Cannam and QMUL.
00019 */
00020 
00021 #ifndef _PLUGIN_IDENTIFIER_H_
00022 #define _PLUGIN_IDENTIFIER_H_
00023 
00024 #include <QString>
00025 
00026 
00027 // A plugin identifier is simply a string; this class provides methods
00028 // to parse it into its constituent bits (plugin type, DLL path and label).
00029 
00030 class PluginIdentifier {
00031 
00032 public:
00033  
00034     static QString createIdentifier(QString type, QString soName, QString label);
00035 
00036     static QString canonicalise(QString identifier);
00037 
00038     static void parseIdentifier(QString identifier,
00039                                 QString &type, QString &soName, QString &label);
00040 
00041     static bool areIdentifiersSimilar(QString id1, QString id2);
00042 
00043     // Fake soName for use with plugins that are actually compiled in
00044     static QString BUILTIN_PLUGIN_SONAME;
00045 
00046     // Not strictly related to identifiers
00047     static QString RESERVED_PROJECT_DIRECTORY_KEY;
00048 };
00049 
00050 #endif