+// AcqMethod::PrintStatus - privately really send a log/status message /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgAcqMethod::PrintStatus(char const * const header, const char* Format,
+ va_list &args) const
+{
+ string CurrentURI = "<UNKNOWN>";
+ if (Queue != 0)
+ CurrentURI = Queue->Uri;
+ if (UsedMirror.empty() == true)
+ fprintf(stdout, "%s\nURI: %s\nMessage: ",
+ header, CurrentURI.c_str());
+ else
+ fprintf(stdout, "%s\nURI: %s\nUsedMirror: %s\nMessage: ",
+ header, CurrentURI.c_str(), UsedMirror.c_str());
+ vfprintf(stdout,Format,args);
+ std::cout << "\n\n" << std::flush;
+}
+ /*}}}*/
+// AcqMethod::Log - Send a log message /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgAcqMethod::Log(const char *Format,...)
+{
+ va_list args;
+ va_start(args,Format);
+ PrintStatus("101 Log", Format, args);
+ va_end(args);
+}
+ /*}}}*/
+// AcqMethod::Status - Send a status message /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgAcqMethod::Status(const char *Format,...)
+{
+ va_list args;
+ va_start(args,Format);
+ PrintStatus("102 Status", Format, args);
+ va_end(args);
+}
+ /*}}}*/
+// AcqMethod::Redirect - Send a redirect message /*{{{*/
+// ---------------------------------------------------------------------
+/* This method sends the redirect message and dequeues the item as
+ * the worker will enqueue again later on to the right queue */
+void pkgAcqMethod::Redirect(const string &NewURI)
+{
+ std::cout << "103 Redirect\nURI: " << Queue->Uri << "\n"
+ << "New-URI: " << NewURI << "\n"
+ << "\n" << std::flush;
+ Dequeue();
+}
+ /*}}}*/