]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tests/stub_comm.cc
Merge form trunk
[thirdparty/squid.git] / src / tests / stub_comm.cc
index fdec79dd986024cff218eafaf26709289459651c..c9720edaae45825641503f61a38a9a5241e24fb5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: stub_comm.cc,v 1.3 2006/09/03 18:58:37 serassio Exp $
+ * $Id$
  *
  * DEBUG: section 84    Helper process maintenance
  * AUTHOR: Robert Collins
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -60,14 +60,20 @@ DeferredReadManager::kickReads(int const count)
 }
 
 void
-comm_read(int fd, char *buf, int size, IOCB *handler, void *handler_data)
+comm_read(const Comm::ConnectionPointer &conn, char *buf, int size, IOCB *handler, void *handler_data)
+{
+    fatal ("Not implemented");
+}
+
+void
+comm_read(const Comm::ConnectionPointer &conn, char*, int, AsyncCall::Pointer &callback)
 {
     fatal ("Not implemented");
 }
 
 /* should be in stub_CommRead */
 #include "CommRead.h"
-CommRead::CommRead (int fd, char *buf, int len, IOCB *handler, void *data)
+CommRead::CommRead (int fd, char *buf, int len, AsyncCall::Pointer &callback)
 {
     fatal ("Not implemented");
 }
@@ -90,6 +96,12 @@ commSetSelect(int fd, unsigned int type, PF * handler, void *client_data,
     /* all test code runs synchronously at the moment */
 }
 
+void
+comm_quick_poll_required()
+{
+    /* for tests ... ignore */
+}
+
 int
 ignoreErrno(int ierrno)
 {
@@ -104,6 +116,13 @@ commSetTimeout(int fd, int timeout, PF * handler, void *data)
     return -1;
 }
 
+int
+commSetNonBlocking(int fd)
+{
+    fatal ("Not implemented");
+    return COMM_ERROR;
+}
+
 int
 commUnsetNonBlocking(int fd)
 {
@@ -114,7 +133,7 @@ commUnsetNonBlocking(int fd)
 /* bah, cheating on stub count */
 
 pid_t
-ipcCreate(int type, const char *prog, const char *const args[], const char *name, int *rfd, int *wfd. void **hIpc)
+ipcCreate(int type, const char *prog, const char *const args[], const char *name, Ip::Address &local_addr, int *rfd, int *wfd, void **hIpc)
 {
     fatal ("Not implemented");
     return -1;
@@ -128,6 +147,37 @@ comm_init(void)
     /* Keep a few file descriptors free so that we don't run out of FD's
      * after accepting a client but before it opens a socket or a file.
      * Since Squid_MaxFD can be as high as several thousand, don't waste them */
-    RESERVED_FD = XMIN(100, Squid_MaxFD / 4);
+    RESERVED_FD = min(100, Squid_MaxFD / 4);
+}
+
+/* MinGW needs also a stub of _comm_close() */
+void
+_comm_close(int fd, char const *file, int line)
+{
+    fatal ("Not implemented");
 }
 
+int
+commSetTimeout(int fd, int timeout, AsyncCall::Pointer& callback)
+{
+    fatal ("Not implemented");
+    return -1;
+}
+
+int
+comm_open_uds(int sock_type, int proto, struct sockaddr_un* addr, int flags)
+{
+    fatal ("Not implemented");
+    return -1;
+}
+
+void
+comm_write(int fd, const char *buf, int size, AsyncCall::Pointer &callback, FREE * free_func)
+{
+    fatal ("Not implemented");
+}
+
+ConnectionDetail::ConnectionDetail() : me(), peer()
+{
+    fatal ("Not implemented");
+}