Ignore:
Timestamp:
Mar 8, 2011 6:30:34 AM (11 years ago)
Author:
nanang
Message:

Implementation of re #1202 (PJLIB System Information API) on Symbian/S60 platforms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/os_info.c

    r3436 r3437  
    6060    void pj_iphone_os_get_sys_info(pj_sys_info *si, pj_str_t *si_buffer); 
    6161#endif 
     62     
     63#if defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0 
     64    PJ_BEGIN_DECL 
     65    unsigned pj_symbianos_get_model_info(char *buf, unsigned buf_size); 
     66    unsigned pj_symbianos_get_platform_info(char *buf, unsigned buf_size); 
     67    void pj_symbianos_get_sdk_info(pj_str_t *name, pj_uint32_t *ver); 
     68    PJ_END_DECL 
     69#endif 
     70 
    6271 
    6372static char *ver_info(pj_uint32_t ver, char *buf) 
     
    217226            break; 
    218227    #endif      /* PJ_WIN32_WINCE */ 
     228        } 
     229    } 
     230#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0 
     231    { 
     232        pj_symbianos_get_model_info(si_buffer, sizeof(si_buffer)); 
     233        ALLOC_CP_STR(si_buffer, machine); 
     234         
     235        char *p = si_buffer + sizeof(si_buffer) - left; 
     236        unsigned plen; 
     237        plen = pj_symbianos_get_platform_info(p, left); 
     238        if (plen) { 
     239            /* Output format will be "Series60vX.X" */ 
     240            si.os_name = pj_str("S60"); 
     241            si.os_ver  = parse_version(p+9); 
     242        } else { 
     243            si.os_name = pj_str("Unknown"); 
    219244        } 
    220245    } 
     
    264289                 ((_MSC_VER % 10) << 8); 
    265290    si.sdk_name = pj_str("msvc"); 
     291#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0 
     292    pj_symbianos_get_sdk_info(&si.sdk_name, &si.sdk_ver); 
    266293#endif 
    267294 
Note: See TracChangeset for help on using the changeset viewer.