cocos2d-x  2.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LocalStorage.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include "ExtensionMacros.h"

Functions

CC_EX_DLL void  (const char *fullpath)
 Initializes the database. More...
 
CC_EX_DLL void  ()
 Frees the allocated resources. More...
 
CC_EX_DLL void  (const char *key, const char *value)
 sets an item in the LS More...
 
var  ( var key, var value)
 sets an item in the LS More...
 
local  ( local key, local value)
 sets an item in the LS More...
 
CC_EX_DLL const char *  (const char *key)
 gets an item from the LS More...
 
CC_EX_DLL void  (const char *key)
 removes an item from the LS More...
 

Function Documentation

CC_EX_DLL void localStorageInit ( const char *  fullpath)

Initializes the database.

If path is null, it will create an in-memory DB

var localStorageInit ( var  fullpath)

Initializes the database.

If path is null, it will create an in-memory DB

local localStorageInit ( local  fullpath)

Initializes the database.

If path is null, it will create an in-memory DB

CC_EX_DLL void localStorageFree ( )

Frees the allocated resources.

var localStorageFree ( )

Frees the allocated resources.

local localStorageFree ( )

Frees the allocated resources.

CC_EX_DLL void localStorageSetItem ( const char *  key,
const char *  value 
)

sets an item in the LS

var localStorageSetItem ( var  key,
var  value 
)

sets an item in the LS

local localStorageSetItem ( local  key,
local  value 
)

sets an item in the LS

CC_EX_DLL const char*
localStorageGetItem
( const char *  key)

gets an item from the LS

var localStorageGetItem ( var  key)

gets an item from the LS

local localStorageGetItem ( local  key)

gets an item from the LS

CC_EX_DLL void
localStorageRemoveItem
( const char *  key)

removes an item from the LS

var localStorageRemoveItem ( var  key)

removes an item from the LS

local localStorageRemoveItem ( local  key)

removes an item from the LS