Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
Added skeleton native C API from sota_demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeuer committed Mar 20, 2015
1 parent 8f63d68 commit b4e2f85
Show file tree
Hide file tree
Showing 2 changed files with 632 additions and 0 deletions.
133 changes: 133 additions & 0 deletions c/rvi.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/*
Copyright (C) 2014, Jaguar Land Rover
This program is licensed under the terms and conditions of the
Mozilla Public License, version 2.0. The full text of the
Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
*/
#include "rvi.h"

struct rvi_t {
uint32_t placeholder; /* Not yet implemented */
};

int32_t rvi_init(void)
{
return RVI_OK;
}

int32_t rvi_cleanup(void)
{
return RVI_OK;
}



struct rvi_t* rvi_new(char* service_prefix,
void (*service_available_cb)(struct rvi_t* rvi, char* service_name),
void (*service_unavailable_cb)(struct rvi_t* rvi, char* service_name))
{
return RVI_OK;
}



int32_t rvi_delete(struct rvi_t* rvi)
{
return RVI_OK;
}



int32_t rvi_set_user_data(struct rvi_t* rvi, void* user_data)
{
return RVI_OK;
}


void* rvi_get_user_data(struct rvi_t* rvi)
{
return RVI_OK;
}



int32_t rvi_add_configuration(struct rvi_t* rvi, char* key, char* value)
{
return RVI_OK;
}


int32_t rvi_add_public_key(struct rvi_t* rvi, char* id, char* public_key)
{
return RVI_OK;
}


int32_t rvi_add_certificates(struct rvi_t* rvi,
char* certificate,
char* signature,
char *public_key_id)
{
return RVI_OK;
}



int32_t rvi_register_service(struct rvi_t* rvi, char* local_name,
char* full_service_name, uint32_t full_service_name_sz,
int32_t (*process_message_cb)(struct rvi_t*, char* service_name,
uint32_t trans_id,
uint8_t* data, uint32_t data_sz))
{
return RVI_OK;
}



int32_t rvi_activate(struct rvi_t* rvi)
{
return RVI_OK;
}

int32_t rvi_deactivate(struct rvi_t* rvi)
{
return RVI_OK;
}


int32_t rvi_get_descriptor(struct rvi_t* rvi, int32_t *descriptor)
{
return RVI_OK;
}


int32_t rvi_process(struct rvi_t* rvi)
{
return RVI_OK;
}


int32_t rvi_send_message(struct rvi_t*rvi,
char* service,
time_t timeout,
uint32_t trans_id,
uint8_t* data, uint32_t data_sz,
void (*reply_cb)(struct rvi_t*rvi,
uint32_t trans_id,
int32_t result,
uint8_t* data,
uint32_t data_sz))
{
return RVI_OK;
}


int32_t rvi_reply(struct rvi_t*rvi, uint32_t trans_id,
uint8_t* data, uint32_t data_sz)
{
return RVI_OK;
}



Loading

0 comments on commit b4e2f85

Please sign in to comment.