services.h (888B)
1 /* See LICENSE file for copyright and license details. */ 2 3 #ifndef SERVICES_H 4 #define SERVICES_H 5 6 /* Archive service identifiers */ 7 #define SVC_IA (1 << 0) /* Internet Archive (Wayback Machine) */ 8 #define SVC_ARCHIVEPH (1 << 1) /* archive.today / archive.ph */ 9 #define SVC_WIKIWIX (1 << 2) /* Wikiwix */ 10 #define SVC_ALL (SVC_IA | SVC_ARCHIVEPH | SVC_WIKIWIX) 11 12 /* Initialize/cleanup HTTP client */ 13 void svc_init(void); 14 void svc_cleanup(void); 15 16 /* Submit a URL to all enabled archive services. 17 * Returns number of services that accepted the submission. */ 18 int svc_submit(const char *url, int services, int verbose); 19 20 /* Submit to individual services (return 0 on success, -1 on failure) */ 21 int svc_submit_ia(const char *url, int verbose); 22 int svc_submit_archiveph(const char *url, int verbose); 23 int svc_submit_wikiwix(const char *url, int verbose); 24 25 #endif /* SERVICES_H */