/usr/include/kdesktopfileactions.h is in kdelibs5-dev 4:4.13.3-0ubuntu0.5.
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 | /* This file is part of the KDE libraries
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
* 2000, 2007 David Faure <faure@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License version 2 as published by the Free Software Foundation;
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
**/
#ifndef KDESKTOPFILEACTIONS_H
#define KDESKTOPFILEACTIONS_H
#include <kserviceaction.h>
#include <kio/kio_export.h>
#include <kurl.h>
class KDesktopFile;
class KService;
/**
* KDesktopFileActions provides a number of methods related to actions in desktop files.
*/
namespace KDesktopFileActions
{
/**
* Returns a list of services for the given .desktop file that are handled
* by kio itself. Namely mount/unmount for FSDevice files.
* @return the list of services
*/
KIO_EXPORT QList<KServiceAction> builtinServices( const KUrl& url );
/**
* Returns a list of services defined by the user as possible actions
* on the given .desktop file. May include separators (see KServiceAction::isSeparator)
* which should appear in user-visible representations of those actions,
* such as separators in a menu.
* @param path the path to the desktop file describing the services
* @param bLocalFiles true if those services are to be applied to local files only
* (if false, services that don't have %u or %U in the Exec line won't be taken into account).
* @return the list of user defined actions
*/
KIO_EXPORT QList<KServiceAction> userDefinedServices( const QString& path, bool bLocalFiles );
/**
* Overload of userDefinedServices but also allows you to pass a list of urls for this file.
* This allows for the menu to be changed depending on the exact files via
* the X-KDE-GetActionMenu extension.
*/
KIO_EXPORT QList<KServiceAction> userDefinedServices( const QString& path, const KDesktopFile& desktopFile, bool bLocalFiles, const KUrl::List & file_list = KUrl::List());
/**
* Returns a list of services defined by the user as possible actions
* on the given .desktop file represented by the KService instance.
* May include separators (see KServiceAction::isSeparator) which should
* appear in user-visible representations of those actions,
* such as separators in a menu.
* @param path the path to the desktop file describing the services
* @param bLocalFiles true if those services are to be applied to local files only
* (if false, services that don't have %u or %U in the Exec line won't be taken into account).
* @param file_list list of urls; this allows for the menu to be changed depending on the exact files via
* the X-KDE-GetActionMenu extension.
*
* @return the list of user defined actions
*/
KIO_EXPORT QList<KServiceAction> userDefinedServices( const KService& service, bool bLocalFiles, const KUrl::List & file_list = KUrl::List() );
/**
* Execute @p service on the list of @p urls.
* @param urls the list of urls
* @param service the service to execute
*/
KIO_EXPORT void executeService( const KUrl::List& urls, const KServiceAction& service );
/**
* Invokes the default action for the desktop entry. If the desktop
* entry is not local, then only false is returned. Otherwise we
* would create a security problem. Only types Link and Mimetype
* could be followed.
*
* @param _url the url to run
* @param _is_local true if the URL is local, false otherwise
* @return true on success and false on failure.
* @see KRun::runUrl
*/
KIO_EXPORT bool run( const KUrl& _url, bool _is_local );
}
#endif
|