Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# OSCL Base

## Files
file | oscl_assert.h
| The file oscl_assert.h provides an OSCL_ASSERT macro to document assumptions and test them during development.

file | oscl_base.h
| The file oscl_base.h is the public header that should be included to pick up the platform configuration, basic type definitions, and common macros.

file | oscl_base_alloc.h
| A basic allocator that does not rely on other modules.

file | oscl_base_macros.h
| This file defines common macros and constants for basic compilation support.

file | oscl_byte_order.h
| This file defines functions providing byte ordering utility (e.g., switching between big and little endian orders).

file | oscl_defalloc.h
| The file defines simple default memory allocator classes. These allocators are used by the Oscl_Vector and Oscl_Map class, etc.

file | oscl_dll.h
| Defines a DLL entry point.

file | oscl_exclusive_ptr.h
| This file defines the OsclExclusivePtr template class. This class is used to avoid any potential memory leaks that may arise while returning from methods in case of error.

file | oscl_linked_list.h
| The file oscl_linked_list.h defines the template class Oscl_Linked_List which has a very similar API as the STL Vector class (it basically provides a subset of the STL functionality). Memory allocation is abstracted through the use of an allocator template parameter.

file | oscl_lock_base.h
| This file defines an abstract lock class, OsclLockBase, that is used for APIs potentially requiring multi-thread safety. A null-lock implementation, OsclNullLock, is also provided for single-thread configurations (basically a noop for lock/unlock). Also provides the OsclScopedLock class which is template class takes care of freeing the lock when the class goes out of scope.

file | oscl_map.h
| The file oscl_map.h defines the template class Oscl_Map which has a very similar API as the STL Map class (it basically provides a subset of the STL functionality). Memory allocation is abstracted through the use of an allocator template parameter.

file | oscl_mem_inst.h
| The file defines default memory instrumentation level.

file | oscl_opaque_type.h
| The file oscl_opaque_type.h defines pure virtual classes for working with opaque types.

file | oscl_queue.h
| The file oscl_queue.h defines the template class Oscl_Queue. It is similar to the STL::queue class, with some differences: - less complete - based on array rather than a deque - some interfaces modeled on oscl_vector, for ease of transition Memory allocation is abstracted through the use of an allocator template parameter.

file | oscl_refcounter.h
| A general purpose reference counter to object lifetimes.

file | oscl_refcounter_memfrag.h
| This file provides the definition of reference counted memory fragment, which provides access to a buffer and helps manage its manage its lifetime through the refcount.

file | oscl_shared_ptr.h
| This file defines a template class OsclSharedPtr which is a "smart pointer" to the parameterized type.

file | oscl_stdstring.h
| This file provides standard string operations such as strlen, strncpy, etc. ANSI defines undefined behavior when the destination pointer is null for operations such as strncpy, strncat, etc. But, we chose to define one. In such cases, we return the destination as null.

file | oscl_tagtree.h
| The file oscl_tagtree.h ...

file | oscl_time.h
| The file oscl_time.h defines to classes NTPTime and TimeValue for getting, manipulating, and formatting time values. The TimeValue class is based on the native system time format while NTPTime is used for the standard Network Time Protocol format.

file | oscl_tree.h
| The file oscl_tree.h defines the template class Oscl_Rb_Tree which has a very similar API as the STL Tree class. It is an implementation of a Red-Black Tree for use by the Oscl_Map class. Memory allocation is abstracted through the use of an allocator template parameter.

file | oscl_types.h
| This file contains basic type definitions for common use across platforms.

file | oscl_vector.h
| The file oscl_vector.h defines the template class Oscl_Vector which has a very similar API as the STL Vector class (it basically provides a subset of the STL functionality). Memory allocation is abstracted through the use of an allocator template parameter.

## Data Structures
class | _OsclBasicAllocator
class | LinkedListElement
class | NTPTime
| The NTPTime class represents a time value as the number of seconds since 0h (UTC) Jan. 1, 1900. More...
class | Oscl_Alloc
class | Oscl_Dealloc
class | Oscl_DefAlloc
class | Oscl_DefAllocWithRefCounter
struct | Oscl_Less
class | Oscl_Linked_List
class | Oscl_Linked_List_Base
class | Oscl_Map
class | Oscl_MTLinked_List
class | Oscl_Opaque_Type_Alloc
class | Oscl_Opaque_Type_Alloc_LL
class | Oscl_Opaque_Type_Compare
struct | Oscl_Pair
class | Oscl_Queue
class | Oscl_Queue_Base
class | Oscl_Rb_Tree
class | Oscl_Rb_Tree_Base
struct | Oscl_Rb_Tree_Const_Iterator
struct | Oscl_Rb_Tree_Iterator
struct | Oscl_Rb_Tree_Node
struct | Oscl_Rb_Tree_Node_Base
struct | Oscl_Select1st
struct | Oscl_Tag
struct | Oscl_Tag_Base
class | Oscl_TagTree
class | Oscl_TAlloc
class | Oscl_Vector
class | Oscl_Vector_Base
class | OsclAllocDestructDealloc
class | OsclDestructDealloc
class | OsclExclusiveArrayPtr
| The OsclExclusiveArrayPtr class is a template class that defines an array pointer like object intended to be assigned an address obtanined (directly or or indirectly) by new. When the OsclExclusiveArrayPtr expires, its destructor uses delete to free the memory. More...
class | OsclExclusivePtr
| The OsclExclusivePtr class is a template class that defines a pointer like object intended to be assigned an address obtanined (directly or or indirectly) by new. When the OsclExclusivePtr expires, its destructor uses delete to free the memory. More...
class | OsclExclusivePtrA
| The OsclExclusivePtrA class is a template class that defines any pointer like object intended to be assigned an address obtanined (directly or or indirectly) through Alloc. When the OsclExclusivePtrA expires, Alloc is used to free the memory. More...
class | OsclLockBase
struct | OsclMemoryFragment
class | OsclNullLock
class | OsclRefCounter
class | OsclRefCounterDA
class | OsclRefCounterMemFrag
class | OsclRefCounterMTDA
class | OsclRefCounterMTSA
class | OsclRefCounterSA
class | OsclScopedLock
| The OsclScopedLock class is a template class that handles unlocking an abstract class on destruction. This is very useful for ensuring that the lock is released when the OsclScopedLock goes out of scope. More...
class | OsclSharedPtr
| A parameterized smart pointer class. More...
class | OsclTLS
class | OsclTLSRegistry
class | TimeValue
| The TimeValue class represents a time value in a format native to the system. More...
class | TLSStorageOps
## Defines
#define | OSCL_ASSERT(_expr) ((_expr)?((void)0):OSCL_Assert(# _expr,__FILE__,__LINE__))
#define | OSCL_HAS_SINGLETON_SUPPORT 1
#define | NULL_TERM_CHAR '\0'
| The NULL_TERM_CHAR is used to terminate c-style strings.
#define | NULL (0)
| if the NULL macro isn't already defined, then define it as zero.
#define | OSCL_INLINE inline
#define | OSCL_COND_EXPORT_REF
#define | OSCL_COND_IMPORT_REF
#define | OSCL_CONST_CAST(type, exp) ((type)(exp))
| Type casting macros.
#define | OSCL_STATIC_CAST(type, exp) ((type)(exp))
#define | OSCL_REINTERPRET_CAST(type, exp) ((type)(exp))
#define | OSCL_DYNAMIC_CAST(type, exp) ((type)(exp))
#define | OSCL_VIRTUAL_BASE(type) type
#define | OSCL_UNUSED_ARG(vbl) (void)(vbl)
#define | OSCL_UNUSED_RETURN(value) return value
#define | OSCL_MIN(a, b) ((a) < (b) ? (a) : (b))
#define | OSCL_MAX(a, b) ((a) > (b) ? (a) : (b))
#define | OSCL_ABS(a) ((a) > (0) ? (a) : -(a))
#define | OSCL_TEMPLATED_DESTRUCTOR_CALL(type, simple_type) type :: ~simple_type ()
#define | OSCL_UNSIGNED_CONST(x) x
#define | OSCL_PACKED_VAR "error"
#define | OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE
#define | ALLOCATE(n) allocate_fl(n,__FILE__,__LINE__)
#define | ALLOC_AND_CONSTRUCT(n) alloc_and_construct_fl(n,__FILE__,__LINE__)
#define | OSCL_DLL_ENTRY_POINT() void oscl_dll_entry_point() {}
#define | OSCL_DLL_ENTRY_POINT_DEFAULT()
#define | PVMEM_INST_LEVEL 1
#define | OSCL_DISABLE_WARNING_RETURN_TYPE_NOT_UDT
#define | OSCL_TLS_BASE_SLOTS OSCL_TLS_ID_BASE_LAST +1
#define | OSCL_TLS_EXTERNAL_SLOTS 0
#define | OSCL_TLS_MAX_SLOTS ( OSCL_TLS_BASE_SLOTS + OSCL_TLS_EXTERNAL_SLOTS)
## Typedefs
typedef char | CtimeStrBuf [CTIME_BUFFER_SIZE]
typedef char | PV8601timeStrBuf [PV8601TIME_BUFFER_SIZE]
typedef char | ISO8601timeStrBuf [ISO8601TIME_BUFFER_SIZE]
typedef OsclAny | TOsclTlsKey
typedef int | c_bool
| The c_bool type is mapped to an integer to provide a bool type for C interfaces.
typedef void | OsclAny
| The OsclAny is meant to be used the context of a generic pointer (i.e., no specific type).
typedef char | mbchar
| mbchar is multi-byte char (e.g., UTF-8) with null termination.
typedef unsigned int | uint
| The uint type is a convenient abbreviation for unsigned int.
typedef uint8 | octet
| The octet type is meant to be used for referring to a byte or collection bytes without suggesting anything about the underlying meaning of the bytes.
typedef float | OsclFloat
| The Float type defined as OsclFloat.
typedef OSCL_NATIVE_INT64_TYPE | int64
typedef OSCL_NATIVE_UINT64_TYPE | uint64
typedef OSCL_NATIVE_WCHAR_TYPE | oscl_wchar
typedef oscl_wchar | OSCL_TCHAR
| define OSCL_TCHAR
## Enumerations
enum | TimeUnits { SECONDS = 0, MILLISECONDS = 1, MICROSECONDS = 2 }
| The TimeUnits enum can be used when constructing a TimeValue class. More...
## Functions
OSCL_COND_IMPORT_REF void | _OSCL_Abort ()
| This function terminates the current process abnormally.
OSCL_IMPORT_REF void | OSCL_Assert (const char *expr, const char *filename, int line_number)
| OSCL_ASSERT macro evaluates an expression and when the result is false, prints a diagnostic message and aborts the program.
void | PVOsclBase_Init ()
void | PVOsclBase_Cleanup ()
void | little_endian_to_host (char *data, uint32 size)
| Convert little endian to host format.
void | host_to_little_endian (char *data, unsigned int size)
| Convert host to little endian format.
void | big_endian_to_host (char *data, unsigned int size)
| Convert big endian to host format.
void | host_to_big_endian (char *data, unsigned int size)
| Convert host to big endian format.
OSCL_IMPORT_REF uint32 | oscl_strlen (const char *str)
OSCL_IMPORT_REF uint32 | oscl_strlen (const oscl_wchar *str)
OSCL_IMPORT_REF char * | oscl_strncpy (char *dest, const char *src, uint32 count)
OSCL_IMPORT_REF oscl_wchar * | oscl_strncpy (oscl_wchar *dest, const oscl_wchar *src, uint32 count)
OSCL_IMPORT_REF int32 | oscl_strcmp (const char *str1, const char *str2)
OSCL_IMPORT_REF int32 | oscl_strcmp (const oscl_wchar *str1, const oscl_wchar *str2)
OSCL_IMPORT_REF int32 | oscl_strncmp (const char *str1, const char *str2, uint32 count)
OSCL_IMPORT_REF int32 | oscl_strncmp (const oscl_wchar *str1, const oscl_wchar *str2, uint32 count)
OSCL_IMPORT_REF char * | oscl_strncat (char *dest, const char *src, uint32 count)
OSCL_IMPORT_REF oscl_wchar * | oscl_strncat (oscl_wchar *dest, const oscl_wchar *src, uint32 count)
OSCL_IMPORT_REF const char * | oscl_strchr (const char *str, int32 c)
OSCL_IMPORT_REF char * | oscl_strchr (char *str, int32 c)
OSCL_IMPORT_REF const oscl_wchar * | oscl_strchr (const oscl_wchar *str, int32 c)
OSCL_IMPORT_REF oscl_wchar * | oscl_strchr (oscl_wchar *str, int32 c)
OSCL_IMPORT_REF const char * | oscl_strrchr (const char *str, int32 c)
OSCL_IMPORT_REF char * | oscl_strrchr (char *str, int32 c)
OSCL_IMPORT_REF const oscl_wchar * | oscl_strrchr (const oscl_wchar *str, int32 c)
OSCL_IMPORT_REF oscl_wchar * | oscl_strrchr (oscl_wchar *str, int32 c)
OSCL_IMPORT_REF char * | oscl_strset (char *dest, char val, uint32 count)
OSCL_IMPORT_REF oscl_wchar * | oscl_strset (oscl_wchar *dest, oscl_wchar val, uint32 count)
OSCL_IMPORT_REF int32 | oscl_CIstrcmp (const char *str1, const char *str2)
OSCL_IMPORT_REF int32 | oscl_CIstrcmp (const oscl_wchar *str1, const oscl_wchar *str2)
OSCL_IMPORT_REF int32 | oscl_CIstrncmp (const char *str1, const char *str2, uint32 count)
OSCL_IMPORT_REF int32 | oscl_CIstrncmp (const oscl_wchar *str1, const oscl_wchar *str2, uint32 count)
OSCL_IMPORT_REF char | oscl_tolower (const char car)
OSCL_IMPORT_REF oscl_wchar | oscl_tolower (const oscl_wchar car)
OSCL_IMPORT_REF bool | oscl_isLetter (const char car)
OSCL_IMPORT_REF const char * | oscl_strstr (const char *str1, const char *str2)
OSCL_IMPORT_REF char * | oscl_strstr (char *str1, const char *str2)
OSCL_IMPORT_REF const oscl_wchar * | oscl_strstr (const oscl_wchar *str1, const oscl_wchar *str2)
OSCL_IMPORT_REF oscl_wchar * | oscl_strstr (oscl_wchar *str1, const oscl_wchar *str2)
OSCL_IMPORT_REF char * | oscl_strcat (char *dest, const char *src)
OSCL_IMPORT_REF oscl_wchar * | oscl_strcat (oscl_wchar *dest, const oscl_wchar *src)
OSCL_IMPORT_REF void | PV8601ToRFC822 (PV8601timeStrBuf pv8601_buffer, CtimeStrBuf ctime_buffer)
OSCL_IMPORT_REF void | ISO8601ToRFC822 (ISO8601timeStrBuf iso8601_buffer, CtimeStrBuf ctime_buffer)
OSCL_IMPORT_REF void | RFC822ToPV8601 (CtimeStrBuf ctime_buffer, PV8601timeStrBuf)
OSCL_COND_IMPORT_REF TimeValue | operator- (const TimeValue &a, const TimeValue &b)
OSCL_COND_IMPORT_REF TimeValue | operator+ (const TimeValue &a, const int32 bSeconds)
OSCL_COND_IMPORT_REF TimeValue | operator+ (const int32 aSeconds, const TimeValue &b)
OSCL_COND_IMPORT_REF TimeValue | operator- (const TimeValue &a, const int32 bSeconds)
OSCL_COND_IMPORT_REF TimeValue | operator- (const int32 aSeconds, const TimeValue &b)
bool | operator== (const OsclSharedPtr &b) const
| Test for equality to see if two PVHandles wrap the same object.
void | Bind (const OsclSharedPtr &inHandle)
| Use this function to bind an existing OsclSharedPtr to a already-wrapped object.
void | Bind (TheClass *ptr, OsclRefCounter *in_refcnt)
| Use this function to bind an existing OsclSharedPtr to a new (unwrapped) object.
## Variables
const int | CTIME_BUFFER_SIZE = 26
const int | PV8601TIME_BUFFER_SIZE = 21
const int | ISO8601TIME_BUFFER_SIZE = 21
const long | USEC_PER_SEC = 1000000
const long | MSEC_PER_SEC = 1000
const uint32 | unix_ntp_offset = 2208988800U
const uint32 | OSCL_TLS_ID_MAGICNUM = 0
const uint32 | OSCL_TLS_ID_ERRORHOOK = 1
const uint32 | OSCL_TLS_ID_PVLOGGER = 2
const uint32 | OSCL_TLS_ID_TEST = 3
const uint32 | OSCL_TLS_ID_PVSCHEDULER = 4
const uint32 | OSCL_TLS_ID_PVERRORTRAP = 5
const uint32 | OSCL_TLS_ID_SDPMEDIAPARSER = 6
const uint32 | OSCL_TLS_ID_PAYLOADPARSER = 7
const uint32 | OSCL_TLS_ID_PVMFRECOGNIZER = 8
const uint32 | OSCL_TLS_ID_WMDRM = 9
const uint32 | OSCL_TLS_ID_OSCLREGISTRY = 10
const uint32 | OSCL_TLS_ID_SQLITE3 = 11
const uint32 | OSCL_TLS_ID_BASE_LAST = 11

## Detailed Description

Additional osclbase comment

Additional osclbase comment

Additional osclbase comment

## Define Documentation

#define ALLOC_AND_CONSTRUCT | ( | n |  | ) | alloc_and_construct_fl(n,__FILE__,__LINE__)

#define ALLOCATE | ( | n |  | ) | allocate_fl(n,__FILE__,__LINE__)

#define NULL (0)

| if the NULL macro isn't already defined, then define it as zero.

#define NULL_TERM_CHAR '\0'

| The NULL_TERM_CHAR is used to terminate c-style strings.

#define OSCL_ABS | ( | a |  | ) | ((a) > (0) ? (a) : -(a))

#define OSCL_ASSERT | ( | _expr |  | ) | ((_expr)?((void)0):OSCL_Assert(# _expr,__FILE__,__LINE__))

#define OSCL_COND_EXPORT_REF

#define OSCL_COND_IMPORT_REF

#define OSCL_CONST_CAST | ( | type,
|  | exp |  | ) | ((type)(exp))

  | Type casting macros. Parameters:
  type | Destination type of cast
  exp | Expression to cast

#define OSCL_DISABLE_WARNING_RETURN_TYPE_NOT_UDT

#define OSCL_DISABLE_WARNING_TRUNCATE_DEBUG_MESSAGE

#define OSCL_DLL_ENTRY_POINT | (
|  | ) | void oscl_dll_entry_point() {}

| DLL entry/exit point. Allows you to define custom operations at the entry and exit of the DLL. Place this macro within one souce file for each DLL. Functions with the custom commands for the DLL entry and exit point must also be defined. The entry point custom function is LocalDllEntry(), and the exit point custom function is LocalDllExit(). These functions will be called as a result of executing this macro. Usage : LocalDllEntry() { custom operations... } LocalDllExit() { custom operations... } OSCL_DLL_ENTRY_POINT()

#define OSCL_DLL_ENTRY_POINT_DEFAULT | (
|  | ) |

| Default DLL entry/exit point function. The body of the DLL entry point is given. The macro only needs to be declared within the source file. Usage : OSCL_DLL_ENTRY_POINT_DEFAULT()

#define OSCL_DYNAMIC_CAST | ( | type,
|  | exp |  | ) | ((type)(exp))

#define OSCL_HAS_SINGLETON_SUPPORT 1

#define OSCL_INLINE inline

#define OSCL_MAX | ( | a,
|  | b |  | ) | ((a) > (b) ? (a) : (b))

#define OSCL_MIN | ( | a,
|  | b |  | ) | ((a) < (b) ? (a) : (b))

#define OSCL_PACKED_VAR "error"

#define OSCL_REINTERPRET_CAST | ( | type,
|  | exp |  | ) | ((type)(exp))

#define OSCL_STATIC_CAST | ( | type,
|  | exp |  | ) | ((type)(exp))

#define OSCL_TEMPLATED_DESTRUCTOR_CALL | ( | type,
|  | simple_type |  | ) | type :: ~simple_type ()

#define OSCL_TLS_BASE_SLOTS OSCL_TLS_ID_BASE_LAST +1

#define OSCL_TLS_EXTERNAL_SLOTS 0

#define OSCL_TLS_MAX_SLOTS ( OSCL_TLS_BASE_SLOTS + OSCL_TLS_EXTERNAL_SLOTS)

#define OSCL_UNSIGNED_CONST | ( | x |  | ) | x

#define OSCL_UNUSED_ARG | ( | vbl |  | ) | (void)(vbl)

| The following two macros are used to avoid compiler warnings. OSCL_UNUSED_ARG(vbl) is used to "reference" an otherwise unused parameter or variable, often one which is used only in an OSCL_ASSERT and thus unreferenced in release mode OSCL_UNUSED_RETURN(val) provides a "return" of a value, in places which will not actually be executed, such as after an OSCL_LEAVE or Thread::exit or abort. The value needs to be of an appropriate type for the current function, though zero will usually suffice. Note that OSCL_UNUSED_RETURN will not be necessary for 'void' functions, as there is no requirement for a value-return operation.

#define OSCL_UNUSED_RETURN | ( | value |  | ) | return value

#define OSCL_VIRTUAL_BASE | ( | type |  | ) | type

#define PVMEM_INST_LEVEL 1

## Typedef Documentation

typedef int c_bool

| The c_bool type is mapped to an integer to provide a bool type for C interfaces.

typedef char CtimeStrBuf[CTIME_BUFFER_SIZE]

typedef OSCL_NATIVE_INT64_TYPE int64

typedef char ISO8601timeStrBuf[ISO8601TIME_BUFFER_SIZE]

typedef char mbchar

| mbchar is multi-byte char (e.g., UTF-8) with null termination.

typedef uint8 octet

| The octet type is meant to be used for referring to a byte or collection bytes without suggesting anything about the underlying meaning of the bytes.

typedef oscl_wchar OSCL_TCHAR

| define OSCL_TCHAR

typedef OSCL_NATIVE_WCHAR_TYPE oscl_wchar

typedef void OsclAny

| The OsclAny is meant to be used the context of a generic pointer (i.e., no specific type).

typedef float OsclFloat

| The Float type defined as OsclFloat.

typedef char PV8601timeStrBuf[PV8601TIME_BUFFER_SIZE]

typedef OsclAny TOsclTlsKey

typedef unsigned int uint

| The uint type is a convenient abbreviation for unsigned int.

typedef OSCL_NATIVE_UINT64_TYPE uint64

## Enumeration Type Documentation

enum TimeUnits

  | The TimeUnits enum can be used when constructing a TimeValue class. Enumeration values:
  SECONDS |
  MILLISECONDS |
  MICROSECONDS |

## Function Documentation

OSCL_COND_IMPORT_REF void _OSCL_Abort | ( |  | ) |

| This function terminates the current process abnormally.

void big_endian_to_host | ( | char * | data,
|  | unsigned int | size
| ) |

  | Convert big endian to host format. This function takes a buffer of data which is assumed to be in big endian order and rearranges it to the native order of the machine running the code. If the machine is a big endian machine, nothing is done. Parameters:
  data | A pointer to the input/output buffer
  size | The number of bytes in the buffer.

template<class TheClass>
void OsclSharedPtr< TheClass >::Bind | ( | TheClass * | ptr,
|  | OsclRefCounter * | in_refcnt
| ) | `[inline, inherited]`

| Use this function to bind an existing OsclSharedPtr to a new (unwrapped) object.

template<class TheClass>
void OsclSharedPtr< TheClass >::Bind | ( | const OsclSharedPtr< TheClass > & | inHandle | ) | `[inline, inherited]`

| Use this function to bind an existing OsclSharedPtr to a already-wrapped object.

void host_to_big_endian | ( | char * | data,
|  | unsigned int | size
| ) |

  | Convert host to big endian format. This function takes a buffer of data which is assumed to be in native host order and rearranges it to big endian format. If the machine is a big endian machine, nothing is done. Parameters:
  data | A pointer to the input/output buffer
  size | The number of bytes in the buffer.

void host_to_little_endian | ( | char * | data,
|  | unsigned int | size
| ) |

  | Convert host to little endian format. This function takes a buffer of data which is assumed to be in the host's native order and rearranges it to the little endian format. If the machine is a little endian machine, nothing is done. Parameters:
  data | A pointer to the input/output buffer
  size | The number of bytes in the buffer.

OSCL_IMPORT_REF void ISO8601ToRFC822 | ( | ISO8601timeStrBuf | iso8601_buffer,
|  | CtimeStrBuf | ctime_buffer
| ) |

void little_endian_to_host | ( | char * | data,
|  | uint32 | size
| ) |

  | Convert little endian to host format. This function takes a buffer of data which is assumed to be in little endian order and rearranges it to the native order of the machine running the code. If the machine is a little endian machine, nothing is done. Parameters:
  data | A pointer to the input/output buffer
  size | The number of bytes in the buffer.

OSCL_COND_IMPORT_REF TimeValue operator+ | ( | const int32 | aSeconds,
|  | const TimeValue & | b
| ) |

OSCL_COND_IMPORT_REF TimeValue operator+ | ( | const TimeValue & | a,
|  | const int32 | bSeconds
| ) |

OSCL_COND_IMPORT_REF TimeValue operator- | ( | const int32 | aSeconds,
|  | const TimeValue & | b
| ) |

OSCL_COND_IMPORT_REF TimeValue operator- | ( | const TimeValue & | a,
|  | const int32 | bSeconds
| ) |

OSCL_COND_IMPORT_REF TimeValue operator- | ( | const TimeValue & | a,
|  | const TimeValue & | b
| ) |

template<class TheClass>
bool OsclSharedPtr< TheClass >::operator== | ( | const OsclSharedPtr< TheClass > & | b | ) | const`[inline, inherited]`

| Test for equality to see if two PVHandles wrap the same object.

OSCL_IMPORT_REF void OSCL_Assert | ( | const char * | expr,
|  | const char * | filename,
|  | int | line_number
| ) |

  | OSCL_ASSERT macro evaluates an expression and when the result is false, prints a diagnostic message and aborts the program. Parameters:
  expr | is the expression to be evaluated
  filename | is the name of the current source file
  line_number | is the line number in the current source file

OSCL_IMPORT_REF int32 oscl_CIstrcmp | ( | const oscl_wchar * | str1,
|  | const oscl_wchar * | str2
| ) |

  | Case in-sensitive string comparision. Parameters:
  str1 | string to compare
  str2 | string to compare
Returns: Negative if str1 < str2 Positive if str1 > str2 Zero if equal

OSCL_IMPORT_REF int32 oscl_CIstrcmp | ( | const char * | str1,
|  | const char * | str2
| ) |

  | Case in-sensitive string comparision. Parameters:
  str1 | string to compare
  str2 | string to compare
Returns: Negative if str1 < str2 Positive if str1 > str2 Zero if equal

OSCL_IMPORT_REF int32 oscl_CIstrncmp | ( | const oscl_wchar * | str1,
|  | const oscl_wchar * | str2,
|  | uint32 | count
| ) |

  | Lexicographically compares(case in-sensitive), at most, the first count characters in str1 and str2 and returns a value indicating the relationship between the substrings. Parameters:
  str1 | string to compare
  str2 | string to compare
  count | Number of characters to compare
Returns: Negative if str1 < str2 Positive if str1 > str2 Zero if equal

OSCL_IMPORT_REF int32 oscl_CIstrncmp | ( | const char * | str1,
|  | const char * | str2,
|  | uint32 | count
| ) |

  | Lexicographically compares(case in-sensitive), at most, the first count characters in str1 and str2 and returns a value indicating the relationship between the substrings. Parameters:
  str1 | string to compare
  str2 | string to compare
  count | Number of characters to compare
Returns: Negative if str1 < str2 Positive if str1 > str2 Zero if equal

OSCL_IMPORT_REF bool oscl_isLetter | ( | const char | car | ) |

  | check if supplied parameter is an alphabet (ASCII only). Parameters:
  car |
Returns: 1 if car is an alphabet 0 if car is not an alphabet.

OSCL_IMPORT_REF oscl_wchar* oscl_strcat | ( | oscl_wchar * | dest,
|  | const oscl_wchar * | src
| ) |

  | Appends up to count characters from string src to string dest, and then appends a terminating null character. The initial character of src overwrites the null character at the end of dest. Subsequent characters in src are appended to dest until either the end of src is reached or count characters have been copied. If copying takes place between objects that overlap, the behavior is undefined. Parameters:
  dest | null terminated destination string
  src | source string
  count | number of characters to append.
Returns: dest

OSCL_IMPORT_REF char* oscl_strcat | ( | char * | dest,
|  | const char * | src
| ) |

  | Appends string src to string dest, and then appends a terminating null character. The initial character of src overwrites the null character at the end of dest. Subsequent characters in src are appended to dest until the end of src is reached. If copying takes place between objects that overlap, the behavior is undefined. Parameters:
  dest | null terminated destination string
  src | source string
Returns: dest

OSCL_IMPORT_REF oscl_wchar* oscl_strchr | ( | oscl_wchar * | str,
|  | int32 | c
| ) |

OSCL_IMPORT_REF const oscl_wchar* oscl_strchr | ( | const oscl_wchar * | str,
|  | int32 | c
| ) |

  | Finds the first occurrence of c in string, or it returns NULL if c is not found. The null-terminating character is included in the search. Parameters:
  str | null terminated source string
  c | character to search for
Returns:

OSCL_IMPORT_REF char* oscl_strchr | ( | char * | str,
|  | int32 | c
| ) |

OSCL_IMPORT_REF const char* oscl_strchr | ( | const char * | str,
|  | int32 | c
| ) |

  | Finds the first occurrence of c in string, or it returns NULL if c is not found. The null-terminating character is included in the search. Parameters:
  str | null terminated source string
  c | character to search for
Returns:

OSCL_IMPORT_REF int32 oscl_strcmp | ( | const oscl_wchar * | str1,
|  | const oscl_wchar * | str2
| ) |

  | Lexicographically compares two NULL terminated strings, str1 and str2, and returns a value indicating the relationship between them. Parameters:
  str1 | String to compare
  str2 | String to compare
Returns: Negative if str1 < str2 Positive if str1 > str2 Zero if equal

OSCL_IMPORT_REF int32 oscl_strcmp | ( | const char * | str1,
|  | const char * | str2
| ) |

  | Lexicographically compares two NULL terminated strings, str1 and str2, and returns a value indicating the relationship between them. Parameters:
  str1 | String to compare
  str2 | String to compare
Returns: Negative if str1 < str2 Positive if str1 > str2 Zero if equal

OSCL_IMPORT_REF uint32 oscl_strlen | ( | const oscl_wchar * | str | ) |

  | Gets the length of a wide char string Parameters:
  str | NULL terminated string.
Returns: Returns the number of characters in string, excluding the terminal NULL.

OSCL_IMPORT_REF uint32 oscl_strlen | ( | const char * | str | ) |

  | Gets the length of a string Parameters:
  str | NULL terminated string.
Returns: Returns the number of characters in string, excluding the terminal NULL.

OSCL_IMPORT_REF oscl_wchar* oscl_strncat | ( | oscl_wchar * | dest,
|  | const oscl_wchar * | src,
|  | uint32 | count
| ) |

  | Appends up to count characters from string src to string dest, and then appends a terminating null character. The initial character of src overwrites the null character at the end of dest. Subsequent characters in src are appended to dest until either the end of src is reached or count characters have been copied. If copying takes place between objects that overlap, the behavior is undefined. Parameters:
  dest | null terminated destination string
  src | source string
  count | number of characters to append.
Returns: dest

OSCL_IMPORT_REF char* oscl_strncat | ( | char * | dest,
|  | const char * | src,
|  | uint32 | count
| ) |

  | Appends up to count characters from string src to string dest, and then appends a terminating null character. The initial character of src overwrites the null character at the end of dest. Subsequent characters in src are appended to dest until either the end of src is reached or count characters have been copied. If copying takes place between objects that overlap, the behavior is undefined. Parameters:
  dest | null terminated destination string
  src | source string
  count | number of characters to append.
Returns: dest

OSCL_IMPORT_REF int32 oscl_strncmp | ( | const oscl_wchar * | str1,
|  | const oscl_wchar * | str2,
|  | uint32 | count
| ) |

  | Lexicographically compares, at most, the first count characters in str1 and str2 and returns a value indicating the relationship between the substrings. Parameters:
  str1 | String to compare
  str2 | String to compare
  count | Number of characters to compare
Returns: Negative if str1 < str2 Positive if str1 > str2 Zero if equal

OSCL_IMPORT_REF int32 oscl_strncmp | ( | const char * | str1,
|  | const char * | str2,
|  | uint32 | count
| ) |

  | Lexicographically compares, at most, the first count characters in str1 and str2 and returns a value indicating the relationship between the substrings. Parameters:
  str1 | String to compare
  str2 | String to compare
  count | Number of characters to compare
Returns: Negative if str1 < str2 Positive if str1 > str2 Zero if equal

OSCL_IMPORT_REF oscl_wchar* oscl_strncpy | ( | oscl_wchar * | dest,
|  | const oscl_wchar * | src,
|  | uint32 | count
| ) |

  | Copies the chars of one string to another. Copies the initial count characters of src to dest and returns dest. If count is less than or equal to the length of src, a null character is not appended automatically to the copied string. If count is greater than the length of src, the destination string is padded with null characters up to length count. The behavior of strncpy is undefined if the source and destination strings overlap. Parameters:
  dest | Destination string
  src | NULL terminated source string
  count | Number of chars to copy
Returns: Returns dest.

OSCL_IMPORT_REF char* oscl_strncpy | ( | char * | dest,
|  | const char * | src,
|  | uint32 | count
| ) |

  | Copies the chars of one string to another. Copies the initial count characters of src to dest and returns dest. If count is less than or equal to the length of src, a null character is not appended automatically to the copied string. If count is greater than the length of src, the destination string is padded with null characters up to length count. The behavior of strncpy is undefined if the source and destination strings overlap. Parameters:
  dest | Destination string
  src | NULL terminated source string
  count | Number of chars to copy
Returns: Returns dest.

OSCL_IMPORT_REF oscl_wchar* oscl_strrchr | ( | oscl_wchar * | str,
|  | int32 | c
| ) |

OSCL_IMPORT_REF const oscl_wchar* oscl_strrchr | ( | const oscl_wchar * | str,
|  | int32 | c
| ) |

OSCL_IMPORT_REF char* oscl_strrchr | ( | char * | str,
|  | int32 | c
| ) |

OSCL_IMPORT_REF const char* oscl_strrchr | ( | const char * | str,
|  | int32 | c
| ) |

  | Finds the last occurrence of c in string, or it returns NULL if c is not found. The null-terminating character is included in the search. Parameters:
  str | null terminated source string
  c | character to search for
Returns:

OSCL_IMPORT_REF oscl_wchar* oscl_strset | ( | oscl_wchar * | dest,
|  | oscl_wchar | val,
|  | uint32 | count
| ) |

  | Sets the characters of a string to a specified character Parameters:
  dest | buffer to modify
  val | character to set
  count | number of chars to set
Returns: the value of dest

OSCL_IMPORT_REF char* oscl_strset | ( | char * | dest,
|  | char | val,
|  | uint32 | count
| ) |

  | Sets the characters of a string to a specified character Parameters:
  dest | buffer to modify
  val | character to set
  count | number of chars to set
Returns: the value of dest

OSCL_IMPORT_REF oscl_wchar* oscl_strstr | ( | oscl_wchar * | str1,
|  | const oscl_wchar * | str2
| ) |

OSCL_IMPORT_REF const oscl_wchar* oscl_strstr | ( | const oscl_wchar * | str1,
|  | const oscl_wchar * | str2
| ) |

  | find the occurrence of sub-string in a string. Parameters:
  str1 | string.
  str2 | sub-string
Returns: pointer to the begining of sub-string.

OSCL_IMPORT_REF char* oscl_strstr | ( | char * | str1,
|  | const char * | str2
| ) |

OSCL_IMPORT_REF const char* oscl_strstr | ( | const char * | str1,
|  | const char * | str2
| ) |

  | find the occurrence of sub-string in a string. Parameters:
  str1 | string.
  str2 | sub-string
Returns: pointer to the begining of sub-string.

OSCL_IMPORT_REF oscl_wchar oscl_tolower | ( | const oscl_wchar | car | ) |

  | convert upper case ASCII character to lower case. behaviour of this function for non-ASCII characters is not defined. Parameters:
  car | upper case character.
Returns: lower case character.

OSCL_IMPORT_REF char oscl_tolower | ( | const char | car | ) |

  | convert upper case ASCII character to lower case. behaviour of this function for non-ASCII characters is not defined. Parameters:
  car | upper case character.
Returns: lower case character.

OSCL_IMPORT_REF void PV8601ToRFC822 | ( | PV8601timeStrBuf | pv8601_buffer,
|  | CtimeStrBuf | ctime_buffer
| ) |

void PVOsclBase_Cleanup | ( |  | ) |

| Cleanup OsclBase functionality OsclBase should be cleaned once OsclBase functions are no longer needed

void PVOsclBase_Init | ( |  | ) |

  | Initializes OsclBase functionality. OsclBase must be initialized before any OsclBase functionality can be used. Exceptions:
  leaves | if out-of-memory

OSCL_IMPORT_REF void RFC822ToPV8601 | ( | CtimeStrBuf | ctime_buffer,
|  | PV8601timeStrBuf |
| ) |

## Variable Documentation

const int CTIME_BUFFER_SIZE = 26

const int ISO8601TIME_BUFFER_SIZE = 21

const long MSEC_PER_SEC = 1000

const uint32 OSCL_TLS_ID_BASE_LAST = 11

const uint32 OSCL_TLS_ID_ERRORHOOK = 1

const uint32 OSCL_TLS_ID_MAGICNUM = 0

const uint32 OSCL_TLS_ID_OSCLREGISTRY = 10

const uint32 OSCL_TLS_ID_PAYLOADPARSER = 7

const uint32 OSCL_TLS_ID_PVERRORTRAP = 5

const uint32 OSCL_TLS_ID_PVLOGGER = 2

const uint32 OSCL_TLS_ID_PVMFRECOGNIZER = 8

const uint32 OSCL_TLS_ID_PVSCHEDULER = 4

const uint32 OSCL_TLS_ID_SDPMEDIAPARSER = 6

const uint32 OSCL_TLS_ID_SQLITE3 = 11

const uint32 OSCL_TLS_ID_TEST = 3

const uint32 OSCL_TLS_ID_WMDRM = 9

const int PV8601TIME_BUFFER_SIZE = 21

const uint32 unix_ntp_offset = 2208988800U

const long USEC_PER_SEC = 1000000