1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
/* $Id: matchmaker.h,v 1.1 2003/12/08 09:44:02 twogood Exp $ */
#ifndef __rra_matchmaker_h__
#define __rra_matchmaker_h__
#include <synce.h>
#ifdef __cplusplus
extern "C"
{
#endif
/*
Manage partnerships
*/
typedef struct _RRA_Matchmaker RRA_Matchmaker;
/** Create a new matchmaker object for managing partnerships */
RRA_Matchmaker* rra_matchmaker_new();
/** Destroy the resources allocated by the matchmaker object */
void rra_matchmaker_destroy(RRA_Matchmaker* matchmaker);
/** Set the current partnership index (1 or 2) */
bool rra_matchmaker_set_current_partner(RRA_Matchmaker* matchmaker, uint32_t index);
/** Get the current partnership index (1 or 2) */
bool rra_matchmaker_get_current_partner(RRA_Matchmaker* matchmaker, uint32_t* index);
/** Set numeric ID for partnership 1 or 2 */
bool rra_matchmaker_set_partner_id(RRA_Matchmaker* matchmaker, uint32_t index, uint32_t id);
/** Get numeric ID for partnership 1 or 2 */
bool rra_matchmaker_get_partner_id(RRA_Matchmaker* matchmaker, uint32_t index, uint32_t* id);
/** Set computer name for partnership 1 or 2 */
bool rra_matchmaker_set_partner_name(RRA_Matchmaker* matchmaker, uint32_t index, const char* name);
/** Get computer name for partnership 1 or 2 */
bool rra_matchmaker_get_partner_name(RRA_Matchmaker* matchmaker, uint32_t index, char** name);
/** Generate a new partnership at index 1 or 2 */
bool rra_matchmaker_replace_partnership(RRA_Matchmaker* matchmaker, uint32_t index);
/**
If we don't have a partnership with this device:
If there is an empty partnership slot:
Create a partnership in empty slot
Else
Fail
If we now have a partnership with this device:
Set current partnership to our partnership with the device
*/
bool rra_matchmaker_create_partnership(RRA_Matchmaker*
matchmaker, uint32_t* index);
#define rra_matchmaker_free_partner_name(name) rapi_reg_free_string(name)
#ifdef __cplusplus
}
#endif
#endif
|