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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license that can
* be found in the License.html file in the root of the source tree.
*/
//---------------------------------------------------------------------------
#include "GUI/Common/GUI_Main_Common_Core.h"
#include "Common/Core.h"
//---------------------------------------------------------------------------
//***************************************************************************
// Constructor/Destructor
//***************************************************************************
//---------------------------------------------------------------------------
GUI_Main_Common_Core::GUI_Main_Common_Core(Core* Core_)
{
//Internal
C=Core_;
File_Pos=(size_t)-1;
}
//***************************************************************************
// Actions - Global
//***************************************************************************
//---------------------------------------------------------------------------
size_t GUI_Main_Common_Core::FilesCount_Get()
{
return C->MI->Count_Get();
}
//---------------------------------------------------------------------------
size_t GUI_Main_Common_Core::FilesPos_Get()
{
return File_Pos;
}
//***************************************************************************
// Actions - Per file
//***************************************************************************
//---------------------------------------------------------------------------
String GUI_Main_Common_Core::FileName_Get()
{
return C->MI->Get(File_Pos, Stream_General, 0, __T("CompleteName")).c_str();
}
//***************************************************************************
// Actions - Per StreamKind
//***************************************************************************
//---------------------------------------------------------------------------
size_t GUI_Main_Common_Core::StreamsCount_Get(stream_t StreamKind)
{
return C->MI->Count_Get(File_Pos, StreamKind);
}
//***************************************************************************
// Actions - Per Stream
//***************************************************************************
//---------------------------------------------------------------------------
String GUI_Main_Common_Core::Summary_Get(stream_t StreamKind, size_t StreamPos)
{
C->MI->Option(__T("Inform"), __T("Summary"));
return C->MI->Get(File_Pos, StreamKind, StreamPos, __T("Inform")).c_str();
}
//---------------------------------------------------------------------------
String GUI_Main_Common_Core::Inform_Get(stream_t StreamKind, size_t StreamPos)
{
C->MI->Option(__T("Inform"), __T(""));
return C->MI->Get(File_Pos, StreamKind, StreamPos, __T("Inform")).c_str();
}
//---------------------------------------------------------------------------
String GUI_Main_Common_Core::CodecID_Url_Get(stream_t StreamKind, size_t StreamPos)
{
if (!C->MI->Get(File_Pos, StreamKind, StreamPos, __T("CodecID/Url")).empty())
return C->MI->Get(File_Pos, StreamKind, StreamPos, __T("CodecID/Url")).c_str();
else
return C->MI->Get(File_Pos, StreamKind, StreamPos, __T("Format/Url")).c_str();
}
|