Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsAppleSingleDecoder.h File Reference
#include <stdlib.h>
#include <string.h>
#include <Carbon/Carbon.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ASHeader
struct  ASEntry
struct  ASFinderInfo
struct  ASMacInfo
struct  ASFileDates
class  nsAppleSingleDecoder

Defines

#define APPLESINGLE_MAGIC   0x00051600L
#define APPLESINGLE_VERSION   0x00020000L
#define AS_DATA   1 /* data fork */
#define AS_RESOURCE   2 /* resource fork */
#define AS_REALNAME   3 /* File's name on home file system */
#define AS_COMMENT   4 /* standard Mac comment */
#define AS_ICONBW   5 /* Mac black & white icon */
#define AS_ICONCOLOR   6 /* Mac color icon */
#define AS_FILEDATES   8 /* file dates; create, modify, etc */
#define AS_FINDERINFO   9 /* Mac Finder info & extended info */
#define AS_MACINFO   10 /* Mac file info, attributes, etc */
#define AS_PRODOSINFO   11 /* Pro-DOS file info, attrib., etc */
#define AS_MSDOSINFO   12 /* MS-DOS file info, attributes, etc */
#define AS_AFPNAME   13 /* Short name on AFP server */
#define AS_AFPINFO   14 /* AFP file info, attrib., etc */
#define AS_AFPDIRID   15 /* AFP directory ID */
#define MAC_ERR_CHECK(_funcCall)

Typedefs

typedef struct ASHeader ASHeader
typedef struct ASEntry ASEntry
typedef struct ASFinderInfo ASFinderInfo
typedef struct ASMacInfo ASMacInfo
typedef struct ASFileDates ASFileDates

Functions

Boolean DecodeDirIterateFilter (Boolean containerChanged, ItemCount currentLevel, const FSCatalogInfo *catalogInfo, const FSRef *ref, const FSSpec *spec, const HFSUniStr255 *name, void *yourDataPtr)

Class Documentation

struct ASHeader

Definition at line 62 of file nsAppleSingleDecoder.h.

Class Members
UInt8 filler
UInt32 magicNum
UInt16 numEntries
UInt32 versionNum
struct ASEntry

Definition at line 71 of file nsAppleSingleDecoder.h.

Class Members
UInt32 entryID
UInt32 entryLength
UInt32 entryOffset
struct ASFinderInfo

Definition at line 48 of file asencode.cpp.

Class Members
FInfo ioFlFndrInfo
FXInfo ioFlXFndrInfo
struct ASMacInfo

Definition at line 85 of file nsAppleSingleDecoder.h.

Class Members
UInt8 filler
UInt8 ioFlAttrib
struct ASFileDates

Definition at line 91 of file nsAppleSingleDecoder.h.

Class Members
SInt32 access
SInt32 backup
SInt32 create
SInt32 modify

Define Documentation

#define APPLESINGLE_MAGIC   0x00051600L

Definition at line 59 of file nsAppleSingleDecoder.h.

#define APPLESINGLE_VERSION   0x00020000L

Definition at line 60 of file nsAppleSingleDecoder.h.

#define AS_AFPDIRID   15 /* AFP directory ID */

Definition at line 115 of file nsAppleSingleDecoder.h.

#define AS_AFPINFO   14 /* AFP file info, attrib., etc */

Definition at line 113 of file nsAppleSingleDecoder.h.

#define AS_AFPNAME   13 /* Short name on AFP server */

Definition at line 112 of file nsAppleSingleDecoder.h.

#define AS_COMMENT   4 /* standard Mac comment */

Definition at line 103 of file nsAppleSingleDecoder.h.

#define AS_DATA   1 /* data fork */

Definition at line 100 of file nsAppleSingleDecoder.h.

#define AS_FILEDATES   8 /* file dates; create, modify, etc */

Definition at line 107 of file nsAppleSingleDecoder.h.

#define AS_FINDERINFO   9 /* Mac Finder info & extended info */

Definition at line 108 of file nsAppleSingleDecoder.h.

#define AS_ICONBW   5 /* Mac black & white icon */

Definition at line 104 of file nsAppleSingleDecoder.h.

#define AS_ICONCOLOR   6 /* Mac color icon */

Definition at line 105 of file nsAppleSingleDecoder.h.

#define AS_MACINFO   10 /* Mac file info, attributes, etc */

Definition at line 109 of file nsAppleSingleDecoder.h.

#define AS_MSDOSINFO   12 /* MS-DOS file info, attributes, etc */

Definition at line 111 of file nsAppleSingleDecoder.h.

#define AS_PRODOSINFO   11 /* Pro-DOS file info, attrib., etc */

Definition at line 110 of file nsAppleSingleDecoder.h.

#define AS_REALNAME   3 /* File's name on home file system */

Definition at line 102 of file nsAppleSingleDecoder.h.

#define AS_RESOURCE   2 /* resource fork */

Definition at line 101 of file nsAppleSingleDecoder.h.

#define MAC_ERR_CHECK (   _funcCall)
Value:
err = _funcCall;         \
  if (err!=noErr)         \
      return err;

Definition at line 121 of file nsAppleSingleDecoder.h.


Typedef Documentation

typedef struct ASEntry ASEntry
typedef struct ASFileDates ASFileDates
typedef struct ASFinderInfo ASFinderInfo
typedef struct ASHeader ASHeader
typedef struct ASMacInfo ASMacInfo

Function Documentation

Boolean DecodeDirIterateFilter ( Boolean  containerChanged,
ItemCount  currentLevel,
const FSCatalogInfo *  catalogInfo,
const FSRef ref,
const FSSpec spec,
const HFSUniStr255 *  name,
void yourDataPtr 
)

Definition at line 212 of file nsAppleSingleDecoder.cpp.

{  
  FSRef                   outRef;
  nsAppleSingleDecoder   *thisObj;
  Boolean                 isDir;
  
  // param check
  if (!yourDataPtr || !ref)
    return false;
    
  // extract 'this' -- an nsAppleSingleDecoder instance
  thisObj = (nsAppleSingleDecoder*) yourDataPtr;
  
  isDir = nsAppleSingleDecoder::IsDirectory(ref);
  
  // if current FSRef is file
  if (!isDir)
  {
    // if file is in AppleSingle format
    if (nsAppleSingleDecoder::IsAppleSingleFile(ref))
    {
      // decode file
      thisObj->Decode(ref, &outRef);
    }
  }

  // else current FSRef is folder 
  else
  {
    thisObj->DecodeFolder(ref);
  }

  return false; // always continue iteration
}

Here is the call graph for this function:

Here is the caller graph for this function: