/* .Y / 70 83 / / / / 105 / / / / / / ;A4_QUER.Y */ /* .YT 3 2 0 0 3 3 1 / / / */ /* .H!a!0:io#092/disk#092/mediaAccess#092/grammar#092/cpp#092/MediaInfo.h!0.!c */ /*************************************************************************** io disk mediaAccess grammar MediaInfo.h +++++++++++++++++++++++++++++++++++++++ purpose : header for functions for the grammar ("<...>/MediaInfo.y") of a "mediaAccess"-media- info-structure (/-text) begin : Thu Dec 28 20:36:57 CEST 2017 changes : copyright : (C) 2017 by Thomas Bruecker email : public@thomas-r-bruecker.ch version : -0.0.0 ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either Version 2 of the License, or * * (at your option) any later Version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * * MA 02110-1301 USA. * * * ***************************************************************************/ #include "list.h" #define EXIT_EMPTY_INPUT 253 #define EXIT_NO_MEMORY 2 #define EXIT_NOT_ENOUGH_PARAMETERS 4 #define EXIT_PATH_NOT_FOUND 5 enum CommandTP { LS, MediaHandlerUuid, MediaInfo, PARAMETERS }; struct MediaInfoTP { char* pMethodIdentifier; struct ParameterListTP* pParameterList; }; struct MediaInfoParameterTP { struct list_head List; struct MediaInfoTP* pMediaInfo; char* pParameterIdentifier; }; struct ParameterTP { struct list_head List; char* pParameterIdentifier; char* pValue; }; struct ParameterListTP { struct list_head MediaInfoParameters; struct list_head Parameters; }; struct ParameterListTP* AddParameterListMediaInfo( struct MediaInfoParameterTP* pMediaInfoParameter, struct ParameterListTP* pParameterList ); struct ParameterListTP* AddParameterListParameter( struct ParameterTP* pParameter, struct ParameterListTP* pParameterList ); void FreeInput(struct MediaInfoParameterTP* pMediaInfoParameter); void FreeMediaInfo(struct MediaInfoTP* pMediaInfo); void FreeMediaInfoParameter(struct MediaInfoParameterTP* pMediaInfoParameter); void FreeParameter(struct ParameterTP* pParameter); void FreeParameterList(struct ParameterListTP* pParameterList); void LsMediaInfoParameters(struct ParameterListTP* pParameterList); struct ParameterListTP* NewEmptyParameterList(); struct ParameterTP* NewParameter(char* pParameterIdentifier, char* pValue); struct ParameterListTP* NewParameterListMediaInfo( struct MediaInfoParameterTP* pMediaInfoParameter ); struct ParameterListTP* NewParameterListParameter( struct ParameterTP* pParameter ); struct MediaInfoTP* NewMediaInfo( char* pMethodIdentifier, struct ParameterListTP* pParameterList ); struct MediaInfoParameterTP* NewMediaInfoParameter( struct MediaInfoTP* pMediaInfo, char* pParameterIdentifier ); struct ParameterTP* NewParameter(char* pParameterIdentifier, char* pValue); struct ParameterListTP* NewParameterListMediaInfo( struct MediaInfoParameterTP* pMediaInfoParameter ); struct ParameterListTP* NewParameterListParameter( struct ParameterTP* pParameter ); char* PathName(int ArgC, char** ArgV, int PathArgsIndex); void PrintMediaInfo( struct MediaInfoTP* pMediaInfo, char* pPrefix, char* pSuffix ); void PrintMediaInfoParameters(struct ParameterListTP* pParameterList); void PrintParameters(struct ParameterListTP* pParameterList, char* pPrefix); enum CommandTP XLateCommand(char** ArgV); void yyerror(char const* s); int yylex(); int yylex_destroy(); extern struct MediaInfoParameterTP* pInput; extern char pLine[4096];