00001 00002 /* 00003 * Copyright 2009 Red Hat Inc., Durham, North Carolina. 00004 * All Rights Reserved. 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 * Authors: 00021 * "Pierre Chifflier <chifflier@edenwall.com>" 00022 */ 00023 00024 00025 #ifndef __DPKGINFO_HELPER__ 00026 #define __DPKGINFO_HELPER__ 00027 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 struct dpkginfo_reply_t { 00034 char *name; 00035 char *arch; 00036 char *epoch; 00037 char *release; 00038 char *version; 00039 char *evr; 00040 }; 00041 00042 int dpkginfo_init(); 00043 int dpkginfo_fini(); 00044 00045 struct dpkginfo_reply_t * dpkginfo_get_by_name(const char *name, int *err); 00046 00047 void * dpkginfo_free_reply(struct dpkginfo_reply_t *reply); 00048 00049 #ifdef __cplusplus 00050 } 00051 #endif 00052 00053 #endif /* __DPKGINFO_HELPER__ */