|
|
|
|||||
|
IcePatch design question
Hi there!
Could you please give me a design advice for a program that is quite similar to IcePatch: Apart from only being able to download data, the program should also support uploading data. This would be implemented by adding an upload() function to CFile. Thus, a factory would be used to obtain a handle for new CFile and CFileDesc objects (file object server-side, fileDesc is then client-side) and then the upload() function of CFile would be called. Having uploaded a file, the md5 descriptor in CFileDesc would surely become invalid. Unfortunately, there's no connection between the file and fileDesc objects to make sure that fileDesc is being invalidated. Imho, the only possibility for a slick solution is to wrap the functionality on the client-side thus that another client-side component is responsible for the upload. This client-side component would also have to know about the fileDesc to invalidate it, thus one would need a function like this: bool uploadFile(CFileDesc& desc, ByteArray data) { try { desc.fileHandle->upload(data); } catch () { return false; } desc.bValid = false; return true; } Is this the only possibility or are there ways to avoid such wrapping (i.e. working only with file and fileDesc)? regs, Stephan |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie's question: wondering how to design to make this work... | sjinny | Help Center | 6 | 06-05-2006 12:15 PM |
| how to use icepatch as win32 service? | jeylee | Help Center | 2 | 03-07-2005 08:49 AM |
| How to use IcePatch? | weiwei | Help Center | 7 | 05-24-2004 12:49 PM |
| How to use IcePatch? | alwayscy1 | Help Center | 3 | 10-27-2003 08:40 PM |
| specific design question | sylvain | Help Center | 4 | 07-08-2003 07:28 PM |