/usr/share/sip/PyKDE4/plasma/packagestructure.sip is in python-kde4-dev 4:4.8.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | // Copyright 2008 Simon Edwards <simon@simonzone.com>
// Generated by twine
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as
// published by the Free Software Foundation; either version 2, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details
// You should have received a copy of the GNU Library General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Plasma
{
class PackageStructure : QObject
{
%TypeHeaderCode
#include <plasma/packagestructure.h>
%End
public:
typedef KSharedPtr<Plasma::PackageStructure> Ptr;
explicit PackageStructure (QObject* parent /TransferThis/ = 0, const QString& type = i18nc("A non-functional package","Invalid"));
static Plasma::PackageStructure::Ptr load (const QString& packageFormat);
QString type () const;
QList<const char*> directories () const;
QList<const char*> requiredDirectories () const;
QList<const char*> files () const;
QList<const char*> requiredFiles () const;
void addDirectoryDefinition (const char* key, const QString& path, const QString& name);
void addFileDefinition (const char* key, const QString& path, const QString& name);
QString path (const char* key) const;
QStringList entryList (const char* key);
QString name (const char* key) const;
void setRequired (const char* key, bool required);
bool isRequired (const char* key) const;
void setDefaultMimetypes (QStringList mimetypes);
void setMimetypes (const char* key, QStringList mimetypes);
QStringList mimetypes (const char* key) const;
void setPath (const QString& path);
QString path () const;
void read (const KConfigBase* config);
void write (KConfigBase* config) const;
virtual bool installPackage (const QString& archivePath, const QString& packageRoot);
virtual bool uninstallPackage (const QString& packageName, const QString& packageRoot);
virtual void createNewWidgetBrowser (QWidget* parent /Transfer/ = 0);
QString contentsPrefix () const;
QString defaultPackageRoot () const;
QString servicePrefix () const;
void setServicePrefix (const QString& servicePrefix);
//FIXME PackageMetadata needs a custom = operator for this to work.
//ig virtual Plasma::PackageMetadata metadata ();
bool allowExternalPaths () const;
signals:
void newWidgetBrowserFinished ();
protected:
void setAllowExternalPaths (bool allow);
void setContentsPrefix (const QString& prefix);
void setDefaultPackageRoot (const QString& packageRoot);
virtual void pathChanged ();
public:
~PackageStructure ();
void removeDefinition (const char* key);
QStringList searchPath (const char* key) const;
QStringList contentsPrefixPaths () const;
protected:
void setContentsPrefixPaths (const QStringList& prefixPaths);
};
// PackageStructure
};
// Plasma
%MappedType QList<const char*>
{
%TypeHeaderCode
#include <qlist.h>
%End
%ConvertToTypeCode
return NULL;
%End
%ConvertFromTypeCode
// Create the list.
PyObject *l;
if ((l = PyList_New(sipCpp->size())) == NULL)
return NULL;
// Set the list elements.
for (int i = 0; i < sipCpp->size(); ++i)
{
PyObject *pobj;
int iserr;
if ((pobj = sipBuildResult(&iserr,"s",sipCpp->value(i))) == NULL)
{
Py_DECREF(l);
return NULL;
}
PyList_SET_ITEM(l, i, pobj);
}
return l;
%End
};
|