scribble/inc/FileMgr_page.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int getUniqNameForSCRIB (PFileManager pFM)
void setCurrentPageDirty (PFileManager pFM, gboolean bDirty)
int deleteRelatedFiles (PFileManager pFM, ScribPage *pScribPage)
int insertNewPageAfterCurr (PFileManager pFM)


Function Documentation

int deleteRelatedFiles ( PFileManager  pFM,
ScribPage pScribPage 
)

Definition at line 275 of file FileMgr_page.c.

00276 {
00277     if( NULL==pScribPage) return -1;
00278 
00279     char sFileName[MAX_PATHNAME+1];
00280 
00281     //del the result page
00282     get_result_filename (sFileName, sizeof(sFileName),pFM,pScribPage );
00283     if( 0!=FileDel(sFileName) )
00284     {
00285         SB_ERRORPRINTF("del result file[%s] fail\n",sFileName);
00286         return -1;
00287     }
00288     return 0;
00289 }

Here is the call graph for this function:

int getUniqNameForSCRIB ( PFileManager  pFM  ) 

Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.

Definition at line 57 of file FileMgr_page.c.

00058 {      
00059     char sTmpl[MAX_FILENAME];
00060     if( 0!=getTemplName(sTmpl,sizeof(sTmpl),pFM->sTmplPathName) )
00061     {
00062         SB_ERRORPRINTF("invalid template name\n%s",pFM->sTmplPathName);
00063         return -1;
00064     }
00065     
00066     char outstr[200];
00067     time_t iTime;
00068     time(&iTime);
00069     
00070     char* sScribName=pFM->manifest.sScribbleName;
00071     int iSize=sizeof(pFM->manifest.sScribbleName);
00072     
00073     unsigned int i=0;
00074     while(i++<60)//limit the collisions
00075     {
00076         GetStrFromTime(outstr,sizeof(outstr),iTime);
00077         memset(sScribName,0,iSize);
00078         snprintf(sScribName,iSize,"%s_%s",sTmpl,outstr);
00079         
00080         if(!FileExist2(sScribName,pFM->sDataDir))
00081         {
00082             SB_FMPRINTF("SCRIB=%s\n",sScribName);
00083             return 0;//get the name
00084         }
00085         iTime++;
00086     }
00087     return -1;
00088 }

Here is the call graph for this function:

int insertNewPageAfterCurr ( PFileManager  pFM  ) 

Definition at line 269 of file FileMgr_page.c.

00270 {
00271     return insertNewPage(pFM,pFM->iCurrOpenPage+1,getCurrImgFileName(pFM));
00272 }

Here is the call graph for this function:

void setCurrentPageDirty ( PFileManager  pFM,
gboolean  bDirty 
)

Definition at line 389 of file FileMgr_page.c.

00390 {
00391     getCurrScribPage(pFM)->bDirty=bDirty;
00392     if(bDirty)
00393     {
00394         fm_setIrxInkDirty(pFM,TRUE);
00395     }
00396 }

Here is the call graph for this function:


Generated on Sun Dec 14 17:14:25 2008 by  doxygen 1.5.6