cmTimeLine.c/h Added cmTimeLineFileName()

This commit is contained in:
kpl 2012-11-01 23:22:58 -07:00
parent fc08764718
commit 81ed3aba41
2 changed files with 28 additions and 21 deletions

View File

@ -59,6 +59,7 @@ typedef struct
char* tmpBuf;
unsigned seqCnt;
_cmTlSeq_t* seq; // seq[seqCnt]
const cmChar_t* filename;
} _cmTl_t;
typedef struct
@ -922,12 +923,15 @@ cmTlRC_t cmTimeLineInitializeFromFile( cmCtx_t* ctx, cmTlH_t* hp, cmTlCb_t cbF
if((rc = cmTimeLineInitialize(ctx,hp,cbFunc,cbArg)) != kOkTlRC )
return rc;
//_cmTl_t* p = _cmTlHandleToPtr(*hp);
//_cmTlNotifyListener(p, kInitMsgTlId, NULL );
return cmTimeLineReadJson(*hp,fn);
}
const cmChar_t* cmTimeLineFileName( cmTlH_t h )
{
_cmTl_t* p = _cmTlHandleToPtr(h);
return p->filename;
}
cmTlRC_t cmTimeLineFinalize( cmTlH_t* hp )
{
cmTlRC_t rc;
@ -1218,6 +1222,7 @@ cmTlRC_t cmTimeLineReadJson( cmTlH_t h, const cmChar_t* ifn )
}
p->filename = cmLhAllocStr(p->lH,ifn);
errLabel:
if( rc != kOkTlRC )

View File

@ -104,6 +104,8 @@ extern "C" {
cmTlRC_t cmTimeLineInitialize( cmCtx_t* ctx, cmTlH_t* hp, cmTlCb_t cbFunc, void* cbArg );
cmTlRC_t cmTimeLineInitializeFromFile( cmCtx_t* ctx, cmTlH_t* hp, cmTlCb_t cbFunc, void* cbArg, const cmChar_t* fn );
const cmChar_t* cmTimeLineFileName( cmTlH_t h );
cmTlRC_t cmTimeLineFinalize( cmTlH_t* hp );
bool cmTimeLineIsValid( cmTlH_t h );