Amazon Kinesis Webrtc C SDK
ChannelInfo.c File Reference
#include "../Include_i.h"
Include dependency graph for ChannelInfo.c:

Macros

#define LOG_CLASS   "ChannelInfo"
 
#define ARN_DELIMETER_CHAR   ':'
 
#define ARN_CHANNEL_NAME_CODE_SEP   '/'
 
#define ARN_BEGIN   "arn:aws"
 
#define SIGNALING_CHANNEL_ARN_SERVICE_NAME   "kinesisvideo"
 
#define SIGNALING_CHANNEL_ARN_RESOURCE_TYPE   "channel/"
 
#define AWS_ACCOUNT_ID_LENGTH   12
 
#define AWS_KVS_ARN_CODE_LENGTH   13
 
#define SIGNALING_CHANNEL_ARN_MIN_LENGTH   59
 
#define CHANNEL_ARN_MIN_DIST_FROM_REGION_END_TO_END_OF_ARN   37
 

Functions

STATUS createValidateChannelInfo (PChannelInfo pOrigChannelInfo, PChannelInfo *ppChannelInfo)
 
STATUS freeChannelInfo (PChannelInfo *ppChannelInfo)
 
SIGNALING_CHANNEL_STATUS getChannelStatusFromString (PCHAR status, UINT32 length)
 
SIGNALING_CHANNEL_TYPE getChannelTypeFromString (PCHAR type, UINT32 length)
 
PCHAR getStringFromChannelType (SIGNALING_CHANNEL_TYPE type)
 
SIGNALING_CHANNEL_ROLE_TYPE getChannelRoleTypeFromString (PCHAR type, UINT32 length)
 
PCHAR getStringFromChannelRoleType (SIGNALING_CHANNEL_ROLE_TYPE type)
 
STATUS validateKvsSignalingChannelArnAndExtractChannelName (PChannelInfo pChannelInfo, PUINT16 pStart, PUINT16 pNumChars)
 

Macro Definition Documentation

◆ ARN_BEGIN

#define ARN_BEGIN   "arn:aws"

◆ ARN_CHANNEL_NAME_CODE_SEP

#define ARN_CHANNEL_NAME_CODE_SEP   '/'

◆ ARN_DELIMETER_CHAR

#define ARN_DELIMETER_CHAR   ':'

◆ AWS_ACCOUNT_ID_LENGTH

#define AWS_ACCOUNT_ID_LENGTH   12

◆ AWS_KVS_ARN_CODE_LENGTH

#define AWS_KVS_ARN_CODE_LENGTH   13

◆ CHANNEL_ARN_MIN_DIST_FROM_REGION_END_TO_END_OF_ARN

#define CHANNEL_ARN_MIN_DIST_FROM_REGION_END_TO_END_OF_ARN   37

◆ LOG_CLASS

#define LOG_CLASS   "ChannelInfo"

◆ SIGNALING_CHANNEL_ARN_MIN_LENGTH

#define SIGNALING_CHANNEL_ARN_MIN_LENGTH   59

◆ SIGNALING_CHANNEL_ARN_RESOURCE_TYPE

#define SIGNALING_CHANNEL_ARN_RESOURCE_TYPE   "channel/"

◆ SIGNALING_CHANNEL_ARN_SERVICE_NAME

#define SIGNALING_CHANNEL_ARN_SERVICE_NAME   "kinesisvideo"

Function Documentation

◆ createValidateChannelInfo()

STATUS createValidateChannelInfo ( PChannelInfo  pOrigChannelInfo,
PChannelInfo ppChannelInfo 
)

Takes in a pointer to a public version of ChannelInfo object. Validates and creates an internal object

Returns
- STATUS code of the execution
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeChannelInfo()

STATUS freeChannelInfo ( PChannelInfo ppChannelInfo)

Frees the channel info object.

Parameters
-PChannelInfo* - IN - Channel info object to free
Returns
- STATUS code of the execution
Here is the caller graph for this function:

◆ getChannelRoleTypeFromString()

SIGNALING_CHANNEL_ROLE_TYPE getChannelRoleTypeFromString ( PCHAR  type,
UINT32  length 
)

Returns the signaling channel Role from a string

Parameters
-PCHAR - IN - String representation of the channel role
-UINT32 - IN - String length
Returns
- Signaling channel type

◆ getChannelStatusFromString()

SIGNALING_CHANNEL_STATUS getChannelStatusFromString ( PCHAR  status,
UINT32  length 
)

Returns the signaling channel status from a string

Parameters
-PCHAR - IN - String representation of the channel status
-UINT32 - IN - String length
Returns
- Signaling channel status type
Here is the caller graph for this function:

◆ getChannelTypeFromString()

SIGNALING_CHANNEL_TYPE getChannelTypeFromString ( PCHAR  type,
UINT32  length 
)

Returns the signaling channel type from a string

Parameters
-PCHAR - IN - String representation of the channel type
-UINT32 - IN - String length
Returns
- Signaling channel type
Here is the caller graph for this function:

◆ getStringFromChannelRoleType()

PCHAR getStringFromChannelRoleType ( SIGNALING_CHANNEL_ROLE_TYPE  type)

Returns the signaling channel role type string

Parameters
-SIGNALING_CHANNEL_TYPE - IN - Signaling channel type
Returns
- Signaling channel type string
Here is the caller graph for this function:

◆ getStringFromChannelType()

PCHAR getStringFromChannelType ( SIGNALING_CHANNEL_TYPE  type)

Returns the signaling channel type string

Parameters
-SIGNALING_CHANNEL_TYPE - IN - Signaling channel type
Returns
- Signaling channel type string
Here is the caller graph for this function:

◆ validateKvsSignalingChannelArnAndExtractChannelName()

STATUS validateKvsSignalingChannelArnAndExtractChannelName ( PChannelInfo  pChannelInfo,
PUINT16  pStart,
PUINT16  pNumChars 
)

Determines whether or not the channel arn is valid If VALID it extracts the channel name And Sets the pChannelName field in PChannelInfo

Parameters
-PChannelInfo - IN - channel info object
-PUINT16 - OUT - start index of the arn (if valid) where the channel name is
-PUINT16 - OUT - number of characters for the arn (if valid)
Returns
- success if arn was valid otherwise failure
Here is the caller graph for this function: