Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
5. Serialization operations

Serialization operations More...

Functions

virtual size_t kodi::addon::CInstanceGame::SerializeSize ()
 Get the number of bytes required to serialize the game.
 
virtual GAME_ERROR kodi::addon::CInstanceGame::Serialize (uint8_t *data, size_t size)
 Serialize the state of the game.
 
virtual GAME_ERROR kodi::addon::CInstanceGame::Deserialize (const uint8_t *data, size_t size)
 Deserialize the game from the given state.
 

Detailed Description

Serialization operations


Serialization operation parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.

Function Documentation

◆ Deserialize()

virtual GAME_ERROR kodi::addon::CInstanceGame::Deserialize ( const uint8_t * data,
size_t size )
inlinevirtual

Deserialize the game from the given state.

Parameters
[in]dataA buffer containing the game's new state
[in]sizeThe size of the buffer
Returns
the error, or GAME_ERROR_NO_ERROR if the game deserialized

◆ Serialize()

virtual GAME_ERROR kodi::addon::CInstanceGame::Serialize ( uint8_t * data,
size_t size )
inlinevirtual

Serialize the state of the game.

Parameters
[in]dataThe buffer receiving the serialized game data
[in]sizeThe size of the buffer
Returns
the error, or GAME_ERROR_NO_ERROR if the game was serialized into the buffer

◆ SerializeSize()

virtual size_t kodi::addon::CInstanceGame::SerializeSize ( )
inlinevirtual

Get the number of bytes required to serialize the game.

Returns
the number of bytes, or 0 if serialization is not supported