[Box Backup-dev] BackupDaemon refactoring

Ben Summers boxbackup-dev@fluffy.co.uk
Thu, 15 Dec 2005 16:53:49 +0000


On 15 Dec 2005, at 16:44, Chris Wilson wrote:

> Hi all,
>
> In order to make Boxi more powerful and easier to use, and lacking  
> a status protocol for Box Backup to report progress, I've had to  
> make Boxi link directly to Box Backup, working with the  
> BackupClient* classes.
>
> In order to do this, I've had to duplicate significant amounts of  
> the BackupDaemon code in Boxi. A lot of that code has changed in  
> trunk with the win32 port, and now needs to be copied back into Boxi.
>
> I'd like to reduce the code duplication, but I don't really want to  
> create an instance of the BackupDaemon. I was wondering if it might  
> be OK to move the code that sets up locations and calls  
> BackupClient* out of BackupDaemon and into a new class, maybe  
> BackupManager, that I can use instead?

Can you be a bit more specific about what you want to do? Do you need  
something it does over and above directly talking to the server using  
the autogenerated Protocol code?

I have no problem with stuff being moved into more generic classes,  
but refactoring does mean there's potential for introducing bugs.

BTW, I try to avoid calling classes *Manager, because this never  
actually describes what it does. *Factory, *Interface, are far better.

Ben