]> code.citadel.org Git - citadel.git/blobdiff - citadel/event_client.h
Fix some issues reported by cppcheck
[citadel.git] / citadel / event_client.h
index d5c2741e02c027b534463dc9187e62755f182941..2d26c2877b645030a5df06af25979db49f1199b4 100644 (file)
@@ -3,18 +3,12 @@
  * Copyright (c) 1998-2012 by the citadel.org team
  *
  *  This program is open source software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
+ *  it under the terms of the GNU General Public License, version 3.
  *
  *  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-1307  USA
  */
 
 #ifndef __EVENT_CLIENT_H__
@@ -30,6 +24,7 @@
 #include <curl/curl.h>
 
 typedef struct AsyncIO AsyncIO;
+typedef struct CitContext CitContext;
 
 typedef enum _eNextState {
        eSendDNSQuery,
@@ -170,7 +165,7 @@ struct AsyncIO {
 
        /* Context specific data; Hint: put AsyncIO in there */
        void *Data;        /* application specific data */
-       void *CitContext;  /* Citadel Session context... */
+       CitContext *CitContext;  /* Citadel Session context... */
 };
 
 typedef struct _IOAddHandler {
@@ -241,6 +236,7 @@ void FreeAsyncIOContents(AsyncIO *IO);
 
 eNextState NextDBOperation(AsyncIO *IO, IO_CallBack CB);
 eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
+void StopDBWatchers(AsyncIO *IO);
 eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB);
 eNextState QueueCurlContext(AsyncIO *IO);
 
@@ -265,7 +261,7 @@ void QueryCbDone(AsyncIO *IO);
 
 void StopClient(AsyncIO *IO);
 
-void StopClientWatchers(AsyncIO *IO);
+void StopClientWatchers(AsyncIO *IO, int CloseFD);
 
 void SetNextTimeout(AsyncIO *IO, double timeout);
 
@@ -301,6 +297,9 @@ int InitcURLIOStruct(AsyncIO *IO,
                     IO_CallBack Terminate,
                     IO_CallBack DBTerminate,
                     IO_CallBack ShutdownAbort);
+void KillAsyncIOContext(AsyncIO *IO);
+void StopCurlWatchers(AsyncIO *IO);
+
 
 eNextState ReAttachIO(AsyncIO *IO,
                      void *pData,