|
|
|
|||||
|
Getting the progress information from IcePatch2
Hello
What is the API of IcePatch2 for mapping of the patch progression? I mean how can I derive the information about the state of the patch progression while IcePatch2-Client is running? You present your own graphical client for IcePatch2 in the manual, but I couldn't find any information about how it derives the progression state from the underlying IcePatch2-application.Best regards Ewgenij |
|
|||||
|
IcePatch2::PatcherFeedback
Ice for C++ provides a include/IcePatch2/ClientUtil.h implementing an asynchronous IcePatch2 client. There are hooks for providing feedback at several points.
See demo/IcePatch2/MFC/PatchClientDlg.{h,cpp} for an example of this. Regards, Paco
__________________
Francisco Moya Fernandez Computer Architecture and Tecnology Group University of Castilla-La Mancha Debian Maintainer of ZeroC Ice packages. |
|
|||||
|
Hello, thanks for your remarks. I looked at the corresponding sources before posting my question. But the problem is that the hooks are not marked there and I do not know where exactly the information is derived. So I thought it would be a great help if somebody could name and describe the hooks shortly so I can localize and use them. It would save me a lot of time to search and understand the way of working of these classes.
Greetings Ewgenij |
|
|||||
|
Did you look at the code?
From the include/IcePatch2/ClientUtil.h:
Code:
class ICE_PATCH2_API PatcherFeedback : public IceUtil::Shared
{
public:
virtual bool noFileSummary(const std::string&) = 0;
virtual bool checksumStart() = 0;
virtual bool checksumProgress(const std::string&) = 0;
virtual bool checksumEnd() = 0;
virtual bool fileListStart() = 0;
virtual bool fileListProgress(Ice::Int) = 0;
virtual bool fileListEnd() = 0;
virtual bool patchStart(const std::string&, Ice::Long, Ice::Long, Ice::Long) = 0;
virtual bool patchProgress(Ice::Long, Ice::Long, Ice::Long, Ice::Long) = 0;
virtual bool patchEnd() = 0;
};
If you want the details read src/IcePatch2/ClientUtil.cpp and src/IcePatch2/Util.cpp. If you just want to use it read src/IcePatch2/Client.cpp or demo/IcePatch2/MFC/PatchClientDlg.* Regards, Paco
__________________
Francisco Moya Fernandez Computer Architecture and Tecnology Group University of Castilla-La Mancha Debian Maintainer of ZeroC Ice packages. |
|
|||||
|
Hey, and what are the arguments of
virtual bool fileListProgress(Ice::Int), virtual bool patchStart(const std::string&, Ice::Long, Ice::Long, Ice::Long) and virtual bool patchProgress(Ice::Long, Ice::Long, Ice::Long, Ice::Long)? Ewgenij |
|
|||||
|
Why don't you read the code?
I must over stress that Ice is very well written. If you are coding an application with Ice you can read C++. Besides, Ice code is very readable. Besides, I told you what to look at. Besides, it takes less than a minute to answer your question by reading the code and a few hours to get a response in the forums. Is this some kind of allergy to foreign code ;-) ?
From demo/IcePatch2/MFC/PatchClientDlg.cpp: Code:
class DialogPatcherFeedback ...
{ ...
virtual bool fileListProgress(Ice::Int percent) ...
virtual bool patchStart(const string& path, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) ...
virtual bool patchProgress(Ice::Long progress, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) ...
};
Regards, F. Moya
__________________
Francisco Moya Fernandez Computer Architecture and Tecnology Group University of Castilla-La Mancha Debian Maintainer of ZeroC Ice packages. |
|
|||||
|
Quote:
Code:
C:\PROJECT>COPY CON PROGRAM.EXE |
|
|||||
|
Thank you!
OK, I see there is no other way than reading foreign code...One more question. After I read the code I didn't find a possibility to retrieve the lists of deleted and updated files. There are FileInfo structures in the Patcher class FileInfoSeq _localFiles; FileInfoSeq _updateFiles; FileInfoSeq _updateFlags; FileInfoSeq _removeFiles; which contain the required information, but they are private and there are no functions available to access their contents. So if I want to get the lists of deleted and updated files I have to make changes to the sources of IcePatch2. Or is there another way? Regards Ewgenij |
|
|||||
|
ClientUtil is just an example
Please, note that ClientUtil has nothing to do with the IcePatch service itself. If you do not like the abstraction provided by Patcher class do not hesitate to build your own.
Many of my students (third year undergrad) didn't feel comfortable with C++ and they built their own abstractions using just the IcePatch Slice interfaces. Most of them came up with different ways to build and save the lists themselves.
__________________
Francisco Moya Fernandez Computer Architecture and Tecnology Group University of Castilla-La Mancha Debian Maintainer of ZeroC Ice packages. |
![]() |
| 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 |
| What does IcePatch2-Client if the connection to IcePatch2-Server breaks? | Ewgenijkkg | Help Center | 1 | 07-11-2007 08:44 PM |
| Newbie problem, receiving Objects without information | m4v3rick | Help Center | 6 | 11-13-2006 11:51 PM |
| ICE connection lifecycle information/implementing recovery | mcrystal | Help Center | 1 | 09-28-2006 06:04 PM |
| Get information from the other side | aroan | Help Center | 1 | 12-27-2004 01:32 PM |
| Background Information | mick | Comments | 1 | 02-27-2003 07:27 AM |