ires_common.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2009, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00039 #ifndef IRES_COMMON_
00040 #define IRES_COMMON_
00041 
00044 
00045 
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif
00049 
00050 #include "ialg.h"
00051 
00052 
00057 typedef enum IRES_Status {
00058     IRES_OK = 0,                
00059     IRES_EALG = 1,              
00060     IRES_EEXISTS = 2,           
00061     IRES_EFAIL = 3,             
00062     IRES_EINIT = 4,             
00063     IRES_ENOINIT = 5,           
00064     IRES_ENOMEM = 6,            
00065     IRES_ENORESOURCE = 7,       
00066     IRES_ENOTFOUND = 8          
00067 } IRES_Status;
00068 
00073 typedef struct IRES_ProtocolRevision {
00074     unsigned int Major;
00075     unsigned int Source;
00076     unsigned int Radius;                /* Using unsigned int here to support
00077                                          * xdc/std.h as well as tistdtypes.h
00078                                          */
00079 } IRES_ProtocolRevision;
00080 
00081 
00085 typedef enum IRES_RequestMode  {
00086     IRES_SCRATCH,               
00090     IRES_PERSISTENT             
00094 } IRES_RequestMode;
00095 
00096 
00103 typedef struct IRES_ProtocolArgs {
00104 
00105     Int32 size;                 
00106     IRES_RequestMode mode;      
00110 } IRES_ProtocolArgs;
00111 
00115 typedef struct IRES_ResourceDescriptor {
00116 
00120     String resourceName;
00121 
00128     struct IRES_ProtocolArgs  *protocolArgs;
00129 
00134     IRES_ProtocolRevision *revision;
00135 
00142     struct IRES_Obj * handle;
00143 
00144 } IRES_ResourceDescriptor;
00145 
00155 typedef struct IRES_Properties {
00156     Int32 size;                 
00157 } IRES_Properties;
00158 
00163 typedef struct IRES_Obj {
00164 
00168     Int32 persistent;
00169 
00175     Void (*getStaticProperties) (struct IRES_Obj * resourceHandle,
00176         IRES_Properties * resourceProperties);
00177 
00178 } IRES_Obj;
00179 
00183 typedef struct IRES_Obj *IRES_Handle;
00184 
00185 
00186 
00187 #ifdef __cplusplus
00188 }
00189 #endif /* extern "C" */
00190 
00193 #endif  /* IRES_COMMON_ */
00194 /*
00195  *  @(#) ti.xdais; 1, 2.0, 1,192; 3-13-2009 12:27:22; /db/wtree/library/trees/dais/dais-o05x/src/
00196  */
00197 

Copyright 2009, Texas Instruments Incorporated