00001 /* 00002 00003 An example of license ... 00004 00005 This source file is part of Scol 00006 For the latest info, see http://www.scolring.org 00007 00008 Copyright (c) 2010 Iri <iri@irizone.net> 00009 00010 This source is under the terms of the Scol License. See the COPYING included file 00011 for more informations. 00012 00013 This program is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00015 FOR A PARTICULAR PURPOSE. 00016 00017 For others informations, please contact us from http://www.scolring.org/ 00018 00019 */ 00020 00021 #ifndef _EXAMPLE_MAIN_H_ 00022 #define _EXAMPLE_MAIN_H_ 00023 00024 #include <stdlib.h> 00025 #include <math.h> 00026 #include <string.h> 00027 #include <curl/curl.h> 00028 00029 00030 /* On inclut le header de définition des structures partagées avec le noyau (impératif) */ 00031 #if defined _WIN32 || defined __WIN32__ 00032 #include "scol_plugin_win.h" 00033 #elif defined linux || defined __linux 00034 #include "scol_plugin_lin.h" 00035 #else 00036 #error no platform supported 00037 #endif 00038 /* On inclut la définition des macros, c'est optionnel mais chaudement recommandé */ 00039 #include "macros.h" 00040 00041 /* Nombre d'éléments de l'API Scol définit dans cette bibliothèque. Ce nombre doit 00042 être rigoureusement exact sous peine de crash ou de non chargement de la bibliothèque. 00043 N'oubliez pas de le mettre à jour à chaque fois que vous ajouter ou supprimer un élément de l'API ! */ 00044 #define EXAMPLE_PKG_NB 3 00045 00046 /* fonctions internes de l'API Scol */ 00047 int sc_getFile (mmachine m); 00048 int sc_newGetUrl (mmachine m); 00049 00050 00051 /* Type objet Scol */ 00052 int ObjCurl; 00053 #define OBJCURL_HANDLE 0 00054 00055 /* nombre de callbacks par type Scol */ 00056 #define CURL_RFL_NB 2 00057 #define CURL_CB_GET 0 /* flag spécifique à la callback */ 00058 00062 struct StrExample 00063 { 00064 CURL * hcurl; 00065 char cerr[CURL_ERROR_SIZE]; 00066 char * url; 00067 mmachine m2m; 00068 }; 00069 00070 #endif 00071