Changeset 4416


Ignore:
Timestamp:
05/08/08 13:37:04 (5 years ago)
Author:
thomas
Message:

opkg: add more attributes to opkg_package_t

Location:
trunk/src/target/opkg
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/opkg/configure.ac

    r4415 r4416  
    11# Process this file with autoconf to produce a configure script 
    22AC_INIT(libopkg/libopkg.c) 
    3 AM_INIT_AUTOMAKE([opkg], [0.1.1]) 
     3AM_INIT_AUTOMAKE([opkg], [0.1.2]) 
    44AM_CONFIG_HEADER(libopkg/config.h) 
    55 
  • trunk/src/target/opkg/libopkg/opkg.c

    r4415 r4416  
    4646 
    4747#define progress(d, p) d.percentage = p; if (progress_callback) progress_callback (opkg, &d, user_data); 
    48 #define OLD_PKG_TO_NEW(pkg) opkg_package_new_with_values (pkg->name, pkg->version, pkg->architecture, pkg->description, pkg->tags, (pkg->state_status == SS_INSTALLED)); 
     48#define OLD_PKG_TO_NEW(pkg) opkg_package_new_with_values (pkg->name, pkg->version, pkg->architecture, pkg->description, pkg->tags, pkg->url, (pkg->size ? atoi (pkg->size) : 0), (pkg->state_status == SS_INSTALLED)); 
    4949 
    5050/** Private Functions ***/ 
     
    146146opkg_package_t * 
    147147opkg_package_new_with_values (const char *name, const char *version, 
    148     const char *arch, const char *desc, const char *tags, int installed) 
     148    const char *arch, const char *desc, const char *tags, const char *url, int size, int installed) 
    149149{ 
    150150  opkg_package_t *package; 
     
    158158  package->description = sstrdup (desc); 
    159159  package->tags = sstrdup (tags); 
     160  package->url = sstrdup (url); 
     161 
     162  package->size = size; 
    160163  package->installed = (installed != 0); 
    161164 
     
    171174  free (p->description); 
    172175  free (p->tags); 
     176  free (p->url); 
    173177 
    174178  free (p); 
  • trunk/src/target/opkg/libopkg/opkg.h

    r4415 r4416  
    3838  char *description; 
    3939  char *tags; 
     40  char *url; 
     41  int size; 
    4042  int installed; 
    4143}; 
     
    4951 
    5052opkg_package_t* opkg_package_new (); 
    51 opkg_package_t* opkg_package_new_with_values (const char *name, const char *version, const char *arch, const char *desc, const char *tags, int installed); 
     53opkg_package_t* opkg_package_new_with_values (const char *name, const char *version, const char *arch, const char *desc, const char *tags, const char *url, int size, int installed); 
    5254void opkg_package_free (opkg_package_t *package); 
    5355 
Note: See TracChangeset for help on using the changeset viewer.