kamera: move KIO slave to kde-workspace repository

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-07-14 22:11:14 +03:00
parent 464b0c826a
commit f8c95b42d3
7 changed files with 0 additions and 1224 deletions

View file

@ -26,11 +26,6 @@ include_directories(
) )
add_subdirectory(kcontrol) add_subdirectory(kcontrol)
add_subdirectory(kioslave)
install(
FILES solid_camera.desktop
DESTINATION ${KDE4_DATA_INSTALL_DIR}/solid/actions
)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

View file

@ -1,40 +0,0 @@
# Try to find Gphoto2 library, once done this will define:
#
# GPHOTO2_FOUND - system has Gphoto2
# GPHOTO2_INCLUDE_DIR - the Gphoto2 include directory
# GPHOTO2_LIBRARIES - the libraries needed to use Gphoto2
#
# Copyright (c) 2021 Ivailo Monev <xakepa10@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if(NOT WIN32)
include(FindPkgConfig)
pkg_check_modules(PC_GPHOTO2 QUIET libgphoto2)
set(GPHOTO2_INCLUDE_DIR ${PC_GPHOTO2_INCLUDE_DIRS})
set(GPHOTO2_LIBRARIES ${PC_GPHOTO2_LIBRARIES})
endif()
set(GPHOTO2_VERSION ${PC_GPHOTO2_VERSION})
if(NOT GPHOTO2_INCLUDE_DIR OR NOT GPHOTO2_LIBRARIES)
find_path(GPHOTO2_INCLUDE_DIR
NAMES gphoto2/gphoto2.h
HINTS $ENV{GPHOTO2DIR}/include
)
find_library(GPHOTO2_LIBRARIES
NAMES gphoto2
HINTS $ENV{GPHOTO2DIR}/lib
)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Gphoto2
VERSION_VAR GPHOTO2_VERSION
REQUIRED_VARS GPHOTO2_LIBRARIES GPHOTO2_INCLUDE_DIR
)
mark_as_advanced(GPHOTO2_INCLUDE_DIR GPHOTO2_LIBRARIES)

View file

@ -1,18 +0,0 @@
set(kio_kamera_PART_SRCS kamera.cpp )
kde4_add_plugin(kio_kamera ${kio_kamera_PART_SRCS})
target_link_libraries(kio_kamera
${KDE4_KIO_LIBS}
${GPHOTO2_LIBRARIES}
)
install(
TARGETS kio_kamera
DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
)
install(
FILES camera.protocol
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
)

View file

@ -1,16 +0,0 @@
[Protocol]
exec=kio_kamera
protocol=camera
input=none
output=filesystem
listing=Name,Type
reading=true
writing=false
deleting=true
source=true
makedir=false
linking=false
moving=false
Icon=camera-photo
maxInstances=1
Class=:local

File diff suppressed because it is too large Load diff

View file

@ -1,79 +0,0 @@
/*
Copyright (C) 2001 The Kompany
2001-2003 Ilya Konstantinov <kde-devel@future.shiny.co.il>
2001-2008 Marcus Meissner <marcus@jet.franken.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, 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 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.
*/
#ifndef __kamera_h__
#define __kamera_h__
#include <kio/slavebase.h>
#include <gphoto2.h>
class KConfig;
class KameraProtocol : public KIO::SlaveBase
{
public:
KameraProtocol(const QByteArray &pool, const QByteArray &app);
virtual ~KameraProtocol();
virtual void get(const KUrl &url);
virtual void stat(const KUrl &url);
virtual void del(const KUrl &url, bool isFile);
virtual void listDir(const KUrl &url);
virtual void special(const QByteArray &data);
CameraFile *getFile() { return m_file; }
KIO::filesize_t getFileSize() { return m_fileSize; }
void setFileSize(KIO::filesize_t newfs) { m_fileSize = newfs; }
private:
Camera *m_camera;
QString current_camera, current_port;
CameraAbilities m_abilities;
KConfig *m_config;
GPContext *m_context;
void split_url2camerapath(QString url, QString &directory, QString &file);
void setCamera(const QString &cam, const QString &port);
void reparseConfiguration(void);
bool openCamera(QString& str);
bool openCamera(void ) { QString errstr; return openCamera(errstr); }
void closeCamera(void);
void statRoot(void);
void statRegular(const KUrl &url);
void translateTextToUDS(KIO::UDSEntry &udsEntry, const QString &info, const char *txt);
void translateFileToUDS(KIO::UDSEntry &udsEntry, const CameraFileInfo &info, QString name);
void translateDirectoryToUDS(KIO::UDSEntry &udsEntry, const QString &dirname);
bool cameraSupportsPreview(void);
bool cameraSupportsDel(void);
bool cameraSupportsPut(void);
int readCameraFolder(const QString &folder, CameraList *dirList, CameraList *fileList);
QString m_lockfile;
int idletime;
KIO::filesize_t m_fileSize;
CameraFile *m_file;
bool actiondone, cameraopen;
};
#endif

View file

@ -1,64 +0,0 @@
[Desktop Entry]
X-KDE-Solid-Predicate=Camera.supportedDrivers == 'gphoto'
Type=Service
Actions=open;
[Desktop Action open]
Exec=kioclient exec camera:/
Icon=system-file-manager
Name=Open with File Manager
Name[ar]=افتح بمدير الملفات
Name[ast]=Abrir con Xestor de Ficheros
Name[bg]=Отваряне в файлов браузър
Name[bs]=Otvori menadžerom datoteka
Name[ca]=Obre amb el gestor de fitxers
Name[ca@valencia]=Obri amb el gestor de fitxers
Name[cs]=Otevřít ve správci souborů
Name[da]=Åbn med filhåndtering
Name[de]=Mit Dateimanager öffnen
Name[el]=Άνοιγμα με τον διαχειριστή αρχείων
Name[en_GB]=Open with File Manager
Name[es]=Abrir con el gestor de archivos
Name[et]=Avamine failihalduriga
Name[eu]=Ireki fitxategi kudeatzailearekin
Name[fi]=Avaa tiedostonhallinnassa
Name[fr]=Ouvrir dans le gestionnaire de fichiers
Name[ga]=Oscail i mBainisteoir Comhad
Name[gl]=Abrir co xestor de ficheiros
Name[hr]=Otvori s preglednikom datoteka
Name[hu]=Megnyitás fájlkezelővel
Name[ia]=Aperi file con le gerente de file
Name[is]=Opna með skráastjóra
Name[it]=Apri con il gestore dei file
Name[ja]=
Name[kk]=Файл менеджерінде ашу
Name[km]=
Name[ko]=
Name[lt]=Atverti su failų tvarkykle
Name[lv]=Atvērt failu pārvaldniekā
Name[mr]=
Name[nb]=Åpne med filbehandler
Name[nds]=Mit Dateipleger opmaken
Name[nl]=Openen met bestandsbeheerder
Name[nn]=Opna med filhandsamaren
Name[pa]=
Name[pl]=Otwórz w przeglądarce plików
Name[pt]=Abrir com o Gestor de Ficheiros
Name[pt_BR]=Abrir com o gerenciador de arquivos
Name[ro]=Deschide cu gestionarul de fișiere
Name[ru]=Открыть в диспетчере файлов
Name[si]=
Name[sk]=Otvoriť v správcovi súborov
Name[sl]=Odpri v upravljalniku datotek
Name[sr]=Отвори менаџером фајлова
Name[sr@ijekavian]=Отвори менаџером фајлова
Name[sr@ijekavianlatin]=Otvori menadžerom fajlova
Name[sr@latin]=Otvori menadžerom fajlova
Name[sv]=Öppna med filhanterare
Name[th]=
Name[tr]=Dosya Yöneticisi ile Aç
Name[ug]=ھۆججەت باشقۇرغۇدا ئاچ
Name[uk]=Відкрити за допомогою менеджера файлів
Name[x-test]=xxOpen with File Managerxx
Name[zh_CN]=
Name[zh_TW]=使