sipxportlib  Version 3.3
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
OsUtil Class Reference

#include <OsUtil.h>

Collaboration diagram for OsUtil:
Collaboration graph
[legend]

Public Types

enum  OsPlatformType {
  PLATFORM_UNKNOWN =-1, PLATFORM_BRUTUS =0, PLATFORM_TCAS1 =1, PLATFORM_TCAS2 =2,
  PLATFORM_TCAS3 =3, PLATFORM_TCAS4 =4, PLATFORM_TCAS5 =5, PLATFORM_TCAS6 =6,
  PLATFORM_TCAS7 =7, PLATFORM_TCAS8 =8, PLATFORM_MACOSX =97, PLATFORM_SOLARIS =98,
  PLATFORM_LINUX =99, PLATFORM_WIN32 =100, PLATFORM_ANDROID =101
}
 
enum  OsProductType { PRODUCT_UNKNOWN =-1, PRODUCT_XPRESSA =0, PRODUCT_INSTANT_XPRESSA =2 }
 

Public Member Functions

OsStatus checkDnsAvailability (char *dnsServer, OsTime timeout)
 
OsStatus checkResponsiveDest (char *destHost, OsTime timeout)
 

Static Public Member Functions

static char * memscan (const char *lookIn, int lookInLen, const char *lookFor, int lookForLen)
 Search a buffer for first occurance of another buffer. binary or ascii. More...
 
static OsStatus insertKeyValue (const UtlString &rPrefix, const UtlString &rName, const intptr_t value, UtlBoolean exceptOnErr=TRUE)
 
static OsStatus deleteKeyValue (const UtlString &rPrefix, const UtlString &rName, intptr_t *pValue=NULL)
 
static OsStatus lookupKeyValue (const UtlString &rPrefix, const UtlString &rName, intptr_t *pValue=NULL)
 
static OsStatus convertUtlStringToInt (const UtlString &rStr, int &rInt)
 
static OsStatus checkIpAddress (const char *addr)
 
static OsStatus checkNetmask (const char *netmask)
 
static UtlBoolean isSameNetwork (const char *destIpAddr, const char *myIpAddr, const char *myNetMask)
 
static void getCurDate (UtlString &dateStr, const struct tm *pCurTime, int maxLen)
 
static void getCurTime (UtlString &timeStr, const struct tm *pCurTime, int maxLen)
 
static int getPlatformType (void)
 
static int getProductType (void)
 

Static Public Attributes

static const UtlString NULL_OS_STRING
 

Protected Member Functions

 OsUtil ()
 
virtual ~OsUtil ()
 

Static Protected Member Functions

static UtlBoolean convertIpAddressToOctets (const char *ipAddr, unsigned char octets[])
 

Member Enumeration Documentation

Enumerator
PLATFORM_UNKNOWN 
PLATFORM_BRUTUS 
PLATFORM_TCAS1 
PLATFORM_TCAS2 
PLATFORM_TCAS3 
PLATFORM_TCAS4 
PLATFORM_TCAS5 
PLATFORM_TCAS6 
PLATFORM_TCAS7 
PLATFORM_TCAS8 
PLATFORM_MACOSX 
PLATFORM_SOLARIS 
PLATFORM_LINUX 
PLATFORM_WIN32 
PLATFORM_ANDROID 
Enumerator
PRODUCT_UNKNOWN 
PRODUCT_XPRESSA 
PRODUCT_INSTANT_XPRESSA 

Constructor & Destructor Documentation

OsUtil ( )
protected
virtual ~OsUtil ( )
protectedvirtual

Member Function Documentation

char * memscan ( const char *  lookIn,
int  lookInLen,
const char *  lookFor,
int  lookForLen 
)
static

Search a buffer for first occurance of another buffer. binary or ascii.

OsStatus insertKeyValue ( const UtlString rPrefix,
const UtlString rName,
const intptr_t  value,
UtlBoolean  exceptOnErr = TRUE 
)
static
OsStatus deleteKeyValue ( const UtlString rPrefix,
const UtlString rName,
intptr_t pValue = NULL 
)
static
OsStatus lookupKeyValue ( const UtlString rPrefix,
const UtlString rName,
intptr_t pValue = NULL 
)
static
OsStatus convertUtlStringToInt ( const UtlString rStr,
int &  rInt 
)
static
OsStatus checkIpAddress ( const char *  addr)
static
OsStatus checkNetmask ( const char *  netmask)
static
UtlBoolean isSameNetwork ( const char *  destIpAddr,
const char *  myIpAddr,
const char *  myNetMask 
)
static
OsStatus checkDnsAvailability ( char *  dnsServer,
OsTime  timeout 
)
OsStatus checkResponsiveDest ( char *  destHost,
OsTime  timeout 
)
void getCurDate ( UtlString dateStr,
const struct tm *  pCurTime,
int  maxLen 
)
static
void getCurTime ( UtlString timeStr,
const struct tm *  pCurTime,
int  maxLen 
)
static
int getPlatformType ( void  )
static
int getProductType ( void  )
static
UtlBoolean convertIpAddressToOctets ( const char *  ipAddr,
unsigned char  octets[] 
)
staticprotected

Member Data Documentation

const UtlString NULL_OS_STRING
static