diff options
Diffstat (limited to 'src/include/gnunet_pq_lib.h')
-rw-r--r-- | src/include/gnunet_pq_lib.h | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/src/include/gnunet_pq_lib.h b/src/include/gnunet_pq_lib.h index ecc2b9719..ff4498938 100644 --- a/src/include/gnunet_pq_lib.h +++ b/src/include/gnunet_pq_lib.h | |||
@@ -853,33 +853,6 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db); | |||
853 | 853 | ||
854 | 854 | ||
855 | /** | 855 | /** |
856 | * Function called whenever the socket needed for | ||
857 | * notifications from postgres changes. | ||
858 | * | ||
859 | * @param cls closure | ||
860 | * @param fd socket to listen on, -1 for none | ||
861 | */ | ||
862 | typedef void | ||
863 | (*GNUNET_PQ_SocketCallback)(void *cls, | ||
864 | int fd); | ||
865 | |||
866 | |||
867 | /** | ||
868 | * Obtain the file descriptor to poll on for notifications. | ||
869 | * Useful if the GNUnet scheduler is NOT to be used for | ||
870 | * such notifications. | ||
871 | * | ||
872 | * @param db database handle | ||
873 | * @param sc function to call with the socket | ||
874 | * @param sc_cls closure for @a sc | ||
875 | */ | ||
876 | void | ||
877 | GNUNET_PQ_event_set_socket_callback (struct GNUNET_PQ_Context *db, | ||
878 | GNUNET_PQ_SocketCallback sc, | ||
879 | void *sc_cls); | ||
880 | |||
881 | |||
882 | /** | ||
883 | * Poll for database events now. Used if the event FD | 856 | * Poll for database events now. Used if the event FD |
884 | * is ready and the application wants to trigger applicable | 857 | * is ready and the application wants to trigger applicable |
885 | * events. | 858 | * events. |
@@ -893,24 +866,6 @@ GNUNET_PQ_event_do_poll (struct GNUNET_PQ_Context *db); | |||
893 | 866 | ||
894 | 867 | ||
895 | /** | 868 | /** |
896 | * Run poll event loop using the GNUnet scheduler. | ||
897 | * | ||
898 | * @param db database handle | ||
899 | */ | ||
900 | void | ||
901 | GNUNET_PQ_event_scheduler_start (struct GNUNET_PQ_Context *db); | ||
902 | |||
903 | |||
904 | /** | ||
905 | * Stop running poll event loop using the GNUnet scheduler. | ||
906 | * | ||
907 | * @param db database handle | ||
908 | */ | ||
909 | void | ||
910 | GNUNET_PQ_event_scheduler_stop (struct GNUNET_PQ_Context *db); | ||
911 | |||
912 | |||
913 | /** | ||
914 | * Register callback to be invoked on events of type @a es. | 869 | * Register callback to be invoked on events of type @a es. |
915 | * | 870 | * |
916 | * Unlike many other calls, this function is thread-safe | 871 | * Unlike many other calls, this function is thread-safe |
@@ -921,14 +876,16 @@ GNUNET_PQ_event_scheduler_stop (struct GNUNET_PQ_Context *db); | |||
921 | * | 876 | * |
922 | * @param db database context to use | 877 | * @param db database context to use |
923 | * @param es specification of the event to listen for | 878 | * @param es specification of the event to listen for |
879 | * @param timeout when to trigger @a cb based on timeout | ||
924 | * @param cb function to call when the event happens, possibly | 880 | * @param cb function to call when the event happens, possibly |
925 | * multiple times (until #GNUNET_PQ_event_listen_cancel() is invoked) | 881 | * multiple times (until #GNUNET_PQ_event_listen_cancel() is invoked), including on timeout |
926 | * @param cb_cls closure for @a cb | 882 | * @param cb_cls closure for @a cb |
927 | * @return handle useful to cancel the listener | 883 | * @return handle useful to cancel the listener |
928 | */ | 884 | */ |
929 | struct GNUNET_DB_EventHandler * | 885 | struct GNUNET_DB_EventHandler * |
930 | GNUNET_PQ_event_listen (struct GNUNET_PQ_Context *db, | 886 | GNUNET_PQ_event_listen (struct GNUNET_PQ_Context *db, |
931 | const struct GNUNET_DB_EventHeaderP *es, | 887 | const struct GNUNET_DB_EventHeaderP *es, |
888 | struct GNUNET_TIME_Relative timeout, | ||
932 | GNUNET_DB_EventCallback cb, | 889 | GNUNET_DB_EventCallback cb, |
933 | void *cb_cls); | 890 | void *cb_cls); |
934 | 891 | ||