A
download geekinfo_c.cpp
Language: C++
Copyright: Copyright 2007 Xo W.
LOC: 26
Project Info
geekinfo - Cross-platform system information tool(geekinfo)
Server: Google
Type: svn
Google\g\geekinfo\trunk\
   basesystem.cpp
   basesystem.h
   cpucount.cpp
   cpucount.h
   cpucount_asm.asm
   cpucount_asm.h
   geekinfo.cpp
   geekinfo.h
   geekinfo_c.cpp
   geekinfo_c.h
   geekinfo_c_test.c
   linuxsystem.cpp
   linuxsystem.h
   macosxsystem.cpp
   macosxsystem.h
   Makefile.win32
   Makefile_c.win32
   model.cpp
   model.h
   model.py
   platform.h
   solarissystem.cpp
   solarissystem.h
   system.cpp
   system.h
   types.h
   win32system.cpp
   win32system.h
   wmi.cpp
   wmi.h

/*
	geekinfo_c.cpp

    Copyright 2007 Xo W.

    A C wrapper for geekinfo...

    Free to use as anyone likes.
*/

#include <cstdlib>
#include <string>
#include <cstring>
#include "system.h"

char *systemMetric_C( SystemMetricType metric )
{
    char *meow;
    std::string moof;
    moof = systemMetric(metric);
    meow = (char *)malloc( 1 + moof.size() );
    strcpy(meow, moof.c_str());
    return meow;
}

uint64 systemMetricInteger_C( SystemMetricType metric )
{
    return systemMetricInteger(metric);
}

char *systemMetricName_C( SystemMetricType metric )
{
    char *meow;
    std::string moof;
    moof = systemMetricName(metric);
    meow = (char *)malloc( 1 + moof.size() );
    strcpy(meow, moof.c_str());
    return meow;
}

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us