Re: Integration of ultracopier



---------- Forwarded message ----------
From: alpha_one_x86 <alpha_one_x86 first-world info>
Date: Thu, Jul 5, 2012 at 3:57 PM
Subject: Re: Integration of ultracopier
To: Cosimo Cecchi <cosimoc gnome org>


On Thu, Jul 5, 2012 at 3:41 PM, Cosimo Cecchi <cosimoc gnome org> wrote:
> On Thu, 2012-07-05 at 15:29 +0200, alpha_one_x86 wrote:
>> I have well look to be not specific to ultracopier (all software using
>> this protocol can use this).
>> It's exactly what is do under windows, the explorer look if one code
>> intercept the copy (in my code I return true if intercepted, false
>> else), else do the copy him self.
>> I have used the same way than all other software (supercopier, copy
>> handler, teracopy, ...).
>
> But I suppose that code lives in an Explorer plugin or something like
> that?
> How does the API look like for somebody who wants to override file
> operations in Explorer?
I'm not sure to understand well the question, then all the code is
accessible here for the windows plugin (this is writen into C/C++ +
win32 api):
https://github.com/alphaonex86/Catchcopy/tree/master/catchcopy-windows-explorer-plugin
The plugin interface with windows explorer:
https://github.com/alphaonex86/Catchcopy/blob/master/catchcopy-windows-explorer-plugin/DDShellExt.cpp
My C++ class with interface:
https://github.com/alphaonex86/Catchcopy/blob/master/catchcopy-windows-explorer-plugin/ClientCatchcopy.h
Here you have the Qt API:
https://github.com/alphaonex86/Catchcopy/tree/master/catchcopy-api-0002
But I have not GTK API.
With all that's, I thinks you have some example of implementation,
without my english mistake.

>
>> After if you have suggestion to be more cleaner, I'm open. But for lot
>> of user wish a quick integration, it's the priority (long time waiting
>> to integrate with natilus, some user more than 4 years).
>> What I can do to help? I thinks nautilus should integrate the plan to
>> intercept the copy (by plugin or not).
>
> I can think of two ways of making something like this possible with
> Nautilus:
> - move the file operations code in Nautilus into e.g. a dbus-driven
> separate process, and have both your software and the default Nautilus
> implementation implement that dbus interface
That's suppose one overwrite the default? ... not very safe I thinks,
because when it close, if I have well understand, you need re-listen
the dbus deamon.
> - augment the libnautilus-extension API with a way to intercept file
> operation calls and outsource them to an external entity
I thinks it's the more safe, less external to default worker, less
verification, ...
And do like windows, API with return true (have work) or false (have
not work then launch the default dialog).
To this I need somebody write the plugin, because I don't know GTK.
>
> That's why I was asking how you are able to do something like this on
> Windows - to get an idea of how other platforms deal with these use
> cases.
>
> Thanks,
> Cosimo
>

It's why I have provided the windows plugin, it's amazing simple and compact.
Mostly it's just that's:
STDMETHODIMP CDDShellExt::InvokeCommand ( LPCMINVOKECOMMANDINFO pInfo )
{
        if(HIWORD(pInfo->lpVerb))
                return E_INVALIDARG;
        switch(LOWORD(pInfo->lpVerb))
        {
                case 0:// copy
                        if(!m_ac.addCopyWithDestination(sources,fDestDir))
                                return E_FAIL;
                break;
                case 1:// move
                        if(!m_ac.addMoveWithDestination(sources,fDestDir))
                                return E_FAIL;
                break;
                default :
                        return S_OK;
        }
        return S_OK;
}

Cheer,



--
alpha_one_x86 <alpha_one_x86 first-world info>
Main developer of Ultracopier, Esourcing and server management
IT, OS, technologies, security and business department


-- 
alpha_one_x86 <alpha_one_x86 first-world info>
Main developer of Ultracopier, Esourcing and server management
IT, OS, technologies, security and business department


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]