42 lines
1.2 KiB
C
42 lines
1.2 KiB
C
#ifndef __ACE_SDK_CLIENT_LIGHT_FEATURE_H__
|
|
#define __ACE_SDK_CLIENT_LIGHT_FEATURE_H__
|
|
|
|
#include <stdint.h>
|
|
#include "ace_sdk_common.h"
|
|
#include "ace_sdk_account.h"
|
|
#include "ace_sdk_client_impl.h"
|
|
|
|
/** The light feature packet buffer */
|
|
typedef struct __AceSdkClientLightFeaturePacket {
|
|
|
|
/** packer buffer */
|
|
uint8_t buffer[1024];
|
|
|
|
/** packet len */
|
|
uint32_t len;
|
|
|
|
} AceSdkClientLightFeaturePacket;
|
|
|
|
/* The light feature info. All fields are transfered from the game server.
|
|
* See AceSdkLightFeatureResponse in ace_sdk_server_light_feature.h */
|
|
typedef struct __AceSdkClientLightFeature {
|
|
const char* name;
|
|
const uint8_t* data;
|
|
uint32_t data_len;
|
|
uint32_t crc;
|
|
} AceSdkClientLightFeature;
|
|
|
|
/**
|
|
* Should be called every time the client tries to send a packet to the game server.
|
|
* @param out_packet packet that should be bind to a game protocol to send to the game server.
|
|
*/
|
|
AceSdkResult ace_sdk_client_get_light_feature_packet(AceSdkClientLightFeaturePacket* out_packet);
|
|
|
|
/**
|
|
* Should be called when game received the light feature from the game server.
|
|
* @param data date received from the game server
|
|
*/
|
|
AceSdkResult ace_sdk_client_on_light_feature_received(const AceSdkClientLightFeature* data);
|
|
|
|
#endif
|