--- ./digikam/digikam/digikamapp.h.dcop	2005-11-21 21:14:05.000000000 +0200
+++ ./digikam/digikam/digikamapp.h	2005-12-17 18:30:09.000000000 +0200
@@ -38,6 +38,7 @@
 #include <kapplication.h>
 #include <kmainwindow.h>
 #include "digikam_export.h"
+#include "dcopiface.h"
 
 namespace KIPI
 {
@@ -183,6 +184,7 @@
     KAction       *mTipAction;
     KAction       *mKipiHelpAction;
     KAction       *mGammaAdjustmentAction;
+    DCOPIface     *mDcopIface;
 
 private slots:
 
--- ./digikam/digikam/dcopiface.h.dcop	2005-12-10 15:54:42.000000000 +0200
+++ ./digikam/digikam/dcopiface.h	2005-12-17 18:29:17.000000000 +0200
@@ -0,0 +1,59 @@
+/*
+ * Author: Leonid Zeitlin <lz@europe.com>, (C) 2005
+ * Copyright 2005 by Leonid Zeitlin
+ *
+ * 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, 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.
+*/
+
+#ifndef DCOPIFACE_H
+#define DCOPIFACE_H
+
+#include <qobject.h>
+#include <dcopobject.h>
+
+/**
+* This class imlements a DCOP interface for DigiKam.
+* At the moment it supports only one method, @ref cameraAutoDetect to open camera dialog
+*
+* @short DCOP interface for DigiKam
+* @author Leonid Zeitlin
+*/
+class DCOPIface : public QObject, public DCOPObject
+{
+    K_DCOP
+    Q_OBJECT
+public:
+    /**
+     * Standard constructor.
+     * @param parent Parent object reference, passed to @ref QObject constructor
+     * @param name Specifis the name of the object, passed to @ref QObject constructor
+     */
+    DCOPIface(QObject *parent = 0, const char *name = 0);
+    /**
+     * Standard destructor
+    */
+    ~DCOPIface();
+signals:
+    /**
+     * This signal is emitted when @ref cameraAutoDetect() is called via DCOP
+     */
+    void signalCameraAutoDetect();
+public:
+k_dcop:
+    /**
+     * This method can be called via DCOP to auto-detect attached camera and show DigiKam camera dialog
+     * For example, a hotplug script can call it when a USB camera is attached to the computer 
+     */
+    ASYNC cameraAutoDetect();
+};
+
+#endif
--- ./digikam/digikam/digikamapp.cpp.dcop	2005-11-21 21:14:05.000000000 +0200
+++ ./digikam/digikam/digikamapp.cpp	2005-12-16 23:28:30.000000000 +0200
@@ -121,6 +121,9 @@
     populateThemes();
 
     setAutoSaveSettings();
+    
+    mDcopIface = new DCOPIface(this, "DCOPIface");
+    connect(mDcopIface, SIGNAL(signalCameraAutoDetect()), this, SLOT(slotCameraAutoDetect()));
 
     // Auto-detect camera if requested so
     if (detectCamera)
--- ./digikam/digikam/dcopiface.cpp.dcop	2005-12-10 15:54:42.000000000 +0200
+++ ./digikam/digikam/dcopiface.cpp	2005-12-17 18:29:27.000000000 +0200
@@ -0,0 +1,35 @@
+/*
+ * Author: Leonid Zeitlin <lz@europe.com>, (C) 2005
+ * Copyright 2005 by Leonid Zeitlin
+ *
+ * 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, 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.
+*/
+
+#include "dcopiface.h"
+
+DCOPIface::DCOPIface(QObject *parent, const char *name)
+    : QObject(parent, name), DCOPObject(name)
+{
+}
+
+
+DCOPIface::~DCOPIface()
+{
+}
+
+void DCOPIface::cameraAutoDetect()
+{
+    emit signalCameraAutoDetect();
+}
+
+
+#include "dcopiface.moc"
--- ./digikam/digikam/Makefile.am.dcop	2005-11-21 21:14:05.000000000 +0200
+++ ./digikam/digikam/Makefile.am	2005-12-16 23:25:48.000000000 +0200
@@ -44,7 +44,8 @@
 			searchquickdialog.cpp searchadvanceddialog.cpp \
 			searchwidgets.cpp kdateedit.cpp kdatetimeedit.cpp \
 			kdatepickerpopup.cpp folderview.cpp folderitem.cpp \
-			upgradedb_sqlite2tosqlite3.cpp squeezedcombobox.cpp
+			upgradedb_sqlite2tosqlite3.cpp squeezedcombobox.cpp \
+			dcopiface.cpp dcopiface.skel
 
 
 libdigikam_la_LIBADD  = $(LIB_KIO) $(LIB_SQLITE3) $(LIB_KABC) \
@@ -95,3 +96,4 @@
 KDE_OPTIONS = nofinal
 
 include ../../admin/Doxyfile.am
+noinst_HEADERS = dcopiface.h
