CVS update: /common/fileio/pub/platform/symbian/

CVS update: /common/fileio/pub/platform/symbian/

gwright at helixcommunity.org gwright at helixcommunity.org
Wed Dec 11 22:02:59 PST 2002


User: gwright Date: 02/12/11 14:02:59
Added
 /common/fileio/pub/platform/symbian/
  filespecsymbian.h, fio.h, hxdir.h, symbianff.h

Log
 adding some symbian stubbed files.
 Issue number:
 Obtained from:
 Submitted by:
 Reviewed by:

File Changes:

Directory: /common/fileio/pub/platform/symbian/
===============================================

File [added]: filespecsymbian.h
Url: https://common.helixcommunity.org/source/browse/common/fileio/pub/platform/symbian/filespecsymbian.h?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 84
---------------
/* ***** BEGIN LICENSE BLOCK ***** 
 * Version: RCSL 1.0/RPSL 1.0 
 *  
 * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
 *      
 * The contents of this file, and the files included with this file, are 
 * subject to the current version of the RealNetworks Public Source License 
 * Version 1.0 (the "RPSL") available at 
 * http://www.helixcommunity.org/content/rpsl unless you have licensed 
 * the file under the RealNetworks Community Source License Version 1.0 
 * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
 * in which case the RCSL will apply. You may also obtain the license terms 
 * directly from RealNetworks.  You may not use this file except in 
 * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
 * applicable to this file, the RCSL.  Please see the applicable RPSL or 
 * RCSL for the rights, obligations and limitations governing use of the 
 * contents of the file.  
 *  
 * This file is part of the Helix DNA Technology. RealNetworks is the 
 * developer of the Original Code and owns the copyrights in the portions 
 * it created. 
 *  
 * This file, and the files included with this file, is distributed and made 
 * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
 * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
 * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
 * 
 * Technology Compatibility Kit Test Suite(s) Location: 
 *    http://www.helixcommunity.org/content/tck 
 * 
 * Contributor(s): 
 *  
 * ***** END LICENSE BLOCK ***** */ 

#ifndef FILESPECSYMBIAN_H
#define FILESPECSYMBIAN_H

#include "hxstring.h"

class CHXFileSpecifier;
class CHXDirSpecifier;

class CHXPathParser
{
    friend class CHXFileSpecifier;
    friend class CHXDirSpecifier;

private:
    CHXPathParser();

    CHXString GetPathName() const;
    BOOL IsSet() const;
    void UnSet();

    CHXPathParser &operator=(const CHXPathParser &other);
    BOOL operator==(const CHXPathParser &other);
    BOOL operator!=(const CHXPathParser &other);

    void ParsePath(const char *psz);

    CHXString GetSubstring(int nStart, int nLength) const;

    CHXString GetPersistentString() const;
    void SetFromPersistentString(const char *pBuffer);



    CHXString m_path;
    BOOL m_bEmpty;

    BOOL m_bIsValid;
    BOOL m_bCannotBeFile;
    BOOL m_bAbsolute;

    int m_nVolumeLength;
    int m_nParentLength;
    int m_nSeparatorLength;
    int m_nNameLength;
    int m_nExtensionSeparatorLength;
    int m_nExtensionLength;
};

#endif // FILESPECSYMBIAN_H

File [added]: fio.h
Url: https://common.helixcommunity.org/source/browse/common/fileio/pub/platform/symbian/fio.h?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 158
----------------
/* ***** BEGIN LICENSE BLOCK ***** 
 * Version: RCSL 1.0/RPSL 1.0 
 *  
 * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
 *      
 * The contents of this file, and the files included with this file, are 
 * subject to the current version of the RealNetworks Public Source License 
 * Version 1.0 (the "RPSL") available at 
 * http://www.helixcommunity.org/content/rpsl unless you have licensed 
 * the file under the RealNetworks Community Source License Version 1.0 
 * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
 * in which case the RCSL will apply. You may also obtain the license terms 
 * directly from RealNetworks.  You may not use this file except in 
 * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
 * applicable to this file, the RCSL.  Please see the applicable RPSL or 
 * RCSL for the rights, obligations and limitations governing use of the 
 * contents of the file.  
 *  
 * This file is part of the Helix DNA Technology. RealNetworks is the 
 * developer of the Original Code and owns the copyrights in the portions 
 * it created. 
 *  
 * This file, and the files included with this file, is distributed and made 
 * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
 * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
 * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
 * 
 * Technology Compatibility Kit Test Suite(s) Location: 
 *    http://www.helixcommunity.org/content/tck 
 * 
 * Contributor(s): 
 *  
 * ***** END LICENSE BLOCK ***** */ 

#ifndef _SYMBIANFIO_H_
#define _SYMBIANFIO_H_

#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>

#include "bio.h"

class FileIO : public IO
{
public:
    FileIO(const char* file, LONG32 flags, 
           mode_t mode = 0666);
    ~FileIO();
    virtual LONG32	close();
    virtual LONG32	read(void* buf, LONG32 size);
    virtual LONG32	write(const void* buf, LONG32 size);
    virtual off_t	seek(off_t off, LONG32 whence);
    virtual LONG32	error();
    virtual LONG32	flags();
    virtual off_t	file_size();

    static void		local_path(char* path);
    static const LONG32	MAXPATH;
    static const char	PATH_SEP;
    static const char* 	NEWLINE;
    static int		is_directory(char* path);

protected:
    int 	fd;
    LONG32	err;
    LONG32	_flags;
};

inline FileIO::FileIO(const char* file, LONG32 flags, mode_t mode) 
{
    err = 0;
    fd = -1;
    fd = ::open(file, flags, mode);
    _flags = flags;
    if (fd < 0)
	err = errno;
}

inline LONG32 FileIO::close() 
{
    LONG32 ret = ::close(fd);
    fd = -1;
    if (ret < 0)
	err = errno;
    return ret;
}

inline FileIO::~FileIO() 
{
    if (fd >= 0)
	close();
    fd = -1;
}

inline off_t FileIO::seek(off_t off, LONG32 whence) 
{
    off_t ret = ::lseek(fd, off, whence);
    if (ret < 0)
	err = errno;
    return ret;
}

inline LONG32 FileIO::read(void * buf, LONG32 len) 
{
    int ret = ::read(fd, (char*)buf, len);
    if (ret < 0)
	err = errno;
    return ret;
}

inline LONG32 FileIO::write(const void * buf, LONG32 len) 
{
    LONG32 ret = ::write(fd, (char*)buf, len);
    if (ret < 0)
	err = errno;
    return ret;
}

inline off_t FileIO::file_size()
{
    struct stat st;
    if (fstat(fd, &st) < 0)
    {
	err = errno;
	return (off_t)-1;
    }
    return st.st_size;
}

inline LONG32 FileIO::error()
{
    return err;
}

inline LONG32 FileIO::flags()
{
    return _flags;
}

inline void FileIO::local_path(char* path)
{
}

inline int FileIO::is_directory(char* path)
{
    struct stat st;
    if (stat(path, &st) < 0)
    {
	return 0;
    }
    return st.st_mode & S_IFDIR;
}

#endif /* _SYMBIAFIO_H_ */

File [added]: hxdir.h
Url: https://common.helixcommunity.org/source/browse/common/fileio/pub/platform/symbian/hxdir.h?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 89
---------------
/* ***** BEGIN LICENSE BLOCK ***** 
 * Version: RCSL 1.0/RPSL 1.0 
 *  
 * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
 *      
 * The contents of this file, and the files included with this file, are 
 * subject to the current version of the RealNetworks Public Source License 
 * Version 1.0 (the "RPSL") available at 
 * http://www.helixcommunity.org/content/rpsl unless you have licensed 
 * the file under the RealNetworks Community Source License Version 1.0 
 * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
 * in which case the RCSL will apply. You may also obtain the license terms 
 * directly from RealNetworks.  You may not use this file except in 
 * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
 * applicable to this file, the RCSL.  Please see the applicable RPSL or 
 * RCSL for the rights, obligations and limitations governing use of the 
 * contents of the file.  
 *  
 * This file is part of the Helix DNA Technology. RealNetworks is the 
 * developer of the Original Code and owns the copyrights in the portions 
 * it created. 
 *  
 * This file, and the files included with this file, is distributed and made 
 * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
 * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
 * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
 * 
 * Technology Compatibility Kit Test Suite(s) Location: 
 *    http://www.helixcommunity.org/content/tck 
 * 
 * Contributor(s): 
 *  
 * ***** END LICENSE BLOCK ***** */ 

#ifndef _SYMBIANHXDIR_H
#define _SYMBIANHXDIR_H

#include"hxbasedir.h"

#define OS_SEPARATOR_CHAR	'/'
#define OS_SEPARATOR_STRING	"/"

class CFindFile;

class CHXDirectory : public XHXDirectory
{
public:
    CHXDirectory();
    ~CHXDirectory();

    virtual BOOL SetTempPath(HXXHANDLE hpsHandle, const char* szRelPath);

    /* Creates directory. */
    virtual BOOL Create();

    /* Checks if directory exists. */    
    virtual BOOL IsValid();

    /* Deletes file. */
    virtual BOOL DeleteFile(const char* szRelPath);

    /* Sets itself to current directory. */
    virtual BOOL SetCurrentDir();

    /* Makes itself a current directory. */
    virtual BOOL MakeCurrentDir();

    /* Starts enumeration process. */
    virtual FSOBJ FindFirst(const char* szPattern, char* szPath, UINT16 nSize);

    /* Continues enumeration process. */
    virtual FSOBJ FindNext(char* szPath, UINT16 nSize);

    /* renames a file */
    virtual UINT32 Rename(const char* szOldName, const char* szNewName);


protected:
    BOOL IsValidFileDirName(const char* szPath);

    CFindFile* m_pFileFinder;

    /* Deletes empty directory. */
    virtual BOOL DeleteDirectory();
};

#endif // _SYMBIANHXDIR_H


File [added]: symbianff.h
Url: https://common.helixcommunity.org/source/browse/common/fileio/pub/platform/symbian/symbianff.h?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 84
---------------
/* ***** BEGIN LICENSE BLOCK ***** 
 * Version: RCSL 1.0/RPSL 1.0 
 *  
 * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
 *      
 * The contents of this file, and the files included with this file, are 
 * subject to the current version of the RealNetworks Public Source License 
 * Version 1.0 (the "RPSL") available at 
 * http://www.helixcommunity.org/content/rpsl unless you have licensed 
 * the file under the RealNetworks Community Source License Version 1.0 
 * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
 * in which case the RCSL will apply. You may also obtain the license terms 
 * directly from RealNetworks.  You may not use this file except in 
 * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
 * applicable to this file, the RCSL.  Please see the applicable RPSL or 
 * RCSL for the rights, obligations and limitations governing use of the 
 * contents of the file.  
 *  
 * This file is part of the Helix DNA Technology. RealNetworks is the 
 * developer of the Original Code and owns the copyrights in the portions 
 * it created. 
 *  
 * This file, and the files included with this file, is distributed and made 
 * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
 * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
 * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
 * 
 * Technology Compatibility Kit Test Suite(s) Location: 
 *    http://www.helixcommunity.org/content/tck 
 * 
 * Contributor(s): 
 *  
 * ***** END LICENSE BLOCK ***** */ 

//
// unix_findfile.h
//
// Interface to CFindFile.
//
// CFindFile is a class for finding files in a search path.
// The file name to search for can contain wildcards.
//
// regcomp/regcmp is used for the pattern-matching, so the
// appropriate library must be linked in to use this class.
//
//

#ifndef __SYMBIANFINDFILE_H
#define __SYMBIANFINDFILE_H

#include "hxtypes.h"
#include <sys/types.h>
#include <dirent.h>

#define OS_PATH_DELIMITER   "\\"

class CSymbianFindFile : public CFindFile
{
public:

	CSymbianFindFile	(const char *path,
			const char *delimiter,
			const char *pattern);

	~CSymbianFindFile();
protected:
	virtual BOOL	OS_OpenDirectory (const char * dirName);
	virtual char *	OS_GetNextFile ();
	virtual void	OS_CloseDirectory ();

	// the pattern methods are used to initialize the
	// pattern-matching routines and then compare
	// individual filenames to the specified pattern.
	virtual BOOL	OS_InitPattern ();
	virtual BOOL	OS_FileMatchesPattern (const char * fname);
	virtual void 	OS_FreePattern ();

	// throw OS-specific directory and pattern-matching
	// variables here!
};

#endif // __SYMBIANFINDFILE_H





---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at common.helixcommunity.org
For additional commands, e-mail: cvs-help at common.helixcommunity.org




More information about the Common-cvs mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.