"Fossies" - the Fresh Open Source Software Archive

Member "rpm2html-1.11.2/sql.h" (2 May 2001, 2498 Bytes) of package /linux/privat/rpm2html-1.11.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "sql.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * sql.h : header for the database fron-end of rpm2html
    3  */
    4 
    5 #ifndef __RPM2HTML_SQL_H__
    6 #define __RPM2HTML_SQL_H__
    7 /*
    8  * Connection handling
    9  */
   10 int init_sql(const char *host, const char *base, const char *user, const char *passwd);
   11 int close_sql(void);
   12 
   13 /*
   14  * Init stuff
   15  */
   16 void sqlInitSqlDistributionList(void);
   17 void sqlListsCleanup(void);
   18 
   19 /*
   20  * Configuration I/O
   21  */
   22 int readConfigSql(void);
   23 void sqlConfigEntry(const char *rpmdir, const char *name, const char *value);
   24 
   25 /*
   26  * Table handling
   27  */
   28 int sql_check_tables(void);
   29 int sql_rebuild_vendors(void);
   30 int sql_rebuild_distribs(void);
   31 int sql_rebuild_mirrors(void);
   32 int sql_rebuild_files(void);
   33 int sql_rebuild_provides(void);
   34 int sql_rebuild_requires(void);
   35 
   36 /*
   37  * display/dump
   38  */
   39 void sql_show_vendors(void);
   40 void sql_show_mirrors(void);
   41 void sql_show_metadata(void);
   42 void sql_show_config(void);
   43 void sql_show_distribs(void);
   44 int sql_show_stats(void);
   45 void sql_show_resources(void);
   46 void sql_show_index(void);
   47 void sql_show_all(void);
   48 void sql_top_index(void);
   49 
   50 /*
   51  * Reindex
   52  */
   53 void sql_reindex(void);
   54 
   55 /*
   56  * Update of pages
   57  */
   58 void sql_show_latests(void);
   59 int sql_get_top_queries(int count);
   60 
   61 /*
   62  * Insertion/Update of records
   63  */
   64 int sql_get_package_id(const char *filename);
   65 int sql_add_distrib(const char *Name, const char *Vendor, const char *Path,
   66     const char *Directory, const char *URL, const char *URLSrc,
   67     const char *Description, const char *Html, const char *Color);
   68 int sql_get_distrib_by_name(const char *Name);
   69 int sql_get_distrib_by_directory(const char *Directory);
   70 int sql_add_vendor(const char *Name, const char *URL, const char *Description);
   71 int sql_add_dist_mirror(int distrib, const char *URL, int country);
   72 int sql_add_mirror(const char *Name, const char *URL, int country);
   73 int sql_add_package(const char *filename,
   74     const char *Name, const char *Version, const char *Release,
   75     const char *Arch,
   76     int dist, const char *URL, const char *URLSrc, int vendor,
   77     const char *Packager, const char *Category, const char *Summary,
   78     const char *Description, const char *Copyright, int Date, int Size,
   79     const char *Os, const char *Distribution, const char *Vendor);
   80 int sql_add_file(const char *filename, int package);
   81 int sql_add_provides(int package, const char *resource);
   82 int sql_add_requires(int package, const char *resource, rpm_dep_flag rel,
   83                  const char *value);
   84 
   85 /*
   86  * Checking/Removal of records
   87  */
   88 int sql_remove_package(int id);
   89 int sql_check_packages(void);
   90 
   91 #endif /* __RPM2HTML_SQL_H__ */