khronosfws/openmax_al/src/radio/xaradioitf.h
changeset 31 8dfd592727cb
parent 16 43d09473c595
child 32 94fc26b6e006
equal deleted inserted replaced
22:128eb6a32b84 31:8dfd592727cb
    20 
    20 
    21 #include "xaadptbasectx.h"
    21 #include "xaadptbasectx.h"
    22 #include "xaradioitfadaptation.h"
    22 #include "xaradioitfadaptation.h"
    23 
    23 
    24 /** MACROS **/
    24 /** MACROS **/
    25 #define RADIO_PRESET_NAME_MAX_LENGTH 20
    25 #define RADIO_DEFAULT_STEREO_MODE 2
    26 
    26 #define RADIO_NUM_OF_PRESETS 20
    27 /** TYPES **/
    27 /** TYPES **/
    28 
    28 
    29 /** ENUMERATIONS **/
    29 /** ENUMERATIONS **/
    30 
    30 
    31 /** STRUCTURES **/
    31 /** STRUCTURES **/
    32 
       
    33 /* Definition of radio preset */
       
    34 typedef struct RadioPreset_
    32 typedef struct RadioPreset_
    35 {
    33 {
    36     XAuint32    freq;
    34     XAuint32    freq;
    37     XAuint8     range;
    35     XAuint8     range;
    38     XAuint32    stereoMode;
    36     XAuint32    stereoMode;
    39     char*       name;
    37     char*       name;
    40 } RadioPreset;
    38 } RadioPreset;
       
    39 
    41 
    40 
    42 /* Definition of XAEqualizerItf implementation */
    41 /* Definition of XAEqualizerItf implementation */
    43 typedef struct XARadioItfImpl_
    42 typedef struct XARadioItfImpl_
    44 {
    43 {
    45     /* parent interface */
    44     /* parent interface */
    49 
    48 
    50     /* variables */
    49     /* variables */
    51     XAboolean   squelch;
    50     XAboolean   squelch;
    52     XAuint32    stereoMode;
    51     XAuint32    stereoMode;
    53 
    52 
    54     XAuint32    preset;
       
    55     XAuint32    numOfPresets;
       
    56 
       
    57     RadioPreset presets[RADIO_NUM_OF_PRESETS];
       
    58 
       
    59     XARadioItf         cbPtrToSelf;
    53     XARadioItf         cbPtrToSelf;
    60     xaRadioCallback    callback;
    54     xaRadioCallback    callback;
    61     void               *context;
    55     void               *context;
       
    56    	XAuint32    preset;
       
    57    	XAuint32    numOfPresets;
       
    58 
       
    59     RadioPreset presets[RADIO_NUM_OF_PRESETS];    
    62 
    60 
    63     /*Adaptation variables*/
    61     /*Adaptation variables*/
    64     XAAdaptationBaseCtx *adapCtx;
    62     XAAdaptationBaseCtx *adapCtx;
    65 } XARadioItfImpl;
    63 } XARadioItfImpl;
    66 
    64 
    99 
    97 
   100 XAresult XARadioItfImpl_Seek(XARadioItf self, XAboolean upwards);
    98 XAresult XARadioItfImpl_Seek(XARadioItf self, XAboolean upwards);
   101 
    99 
   102 XAresult XARadioItfImpl_StopSeeking(XARadioItf self);
   100 XAresult XARadioItfImpl_StopSeeking(XARadioItf self);
   103 
   101 
       
   102 XAresult XARadioItfImpl_RegisterRadioCallback(XARadioItf self,
       
   103                                               xaRadioCallback callback,
       
   104                                               void * pContext);
       
   105                                               
   104 XAresult XARadioItfImpl_GetNumberOfPresets(XARadioItf self, XAuint32 * pNumPresets);
   106 XAresult XARadioItfImpl_GetNumberOfPresets(XARadioItf self, XAuint32 * pNumPresets);
   105 
   107 
   106 XAresult XARadioItfImpl_SetPreset(XARadioItf self,
   108 XAresult XARadioItfImpl_SetPreset(XARadioItf self,
   107                                   XAuint32 preset,
   109                                   XAuint32 preset,
   108                                   XAuint32 freq,
   110                                   XAuint32 freq,
   114                                   XAuint32 preset,
   116                                   XAuint32 preset,
   115                                   XAuint32 * pFreq,
   117                                   XAuint32 * pFreq,
   116                                   XAuint8 * pRange,
   118                                   XAuint8 * pRange,
   117                                   XAuint32 * pMode,
   119                                   XAuint32 * pMode,
   118                                   XAchar * pName,
   120                                   XAchar * pName,
   119                                   XAuint16 * pNameLength);
   121                                   XAuint16 * pNameLength);                                              
   120 
       
   121 XAresult XARadioItfImpl_RegisterRadioCallback(XARadioItf self,
       
   122                                               xaRadioCallback callback,
       
   123                                               void * pContext);
       
   124 
   122 
   125 /* XARadioItfImpl -specific methods */
   123 /* XARadioItfImpl -specific methods */
   126 XARadioItfImpl* XARadioItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
   124 XARadioItfImpl* XARadioItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
   127 void XARadioItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
   125 void XARadioItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
   128 
   126 
   129 void XARadioItfImpl_Free(XARadioItfImpl* self);
   127 void XARadioItfImpl_Free(XARadioItfImpl* self);
   130 
   128 
       
   129 
   131 #endif /* XARADIOITF_H */
   130 #endif /* XARADIOITF_H */