CGComm Namespace Reference


Enumerations

enum  PartDataOpCodes {
  OP_PD_VER = 0x01, OP_PARTDATA = 0x90, OP_PD_DOWNLOADED = 0x91, OP_PD_DESTINATION = 0x92,
  OP_PD_COMPLETED = 0x93, OP_PD_HASHSET = 0x94
}
 Opcodes used within PartData object I/O between streams. More...
enum  HashTypeId {
  OP_HASH = 0xa0, OP_HT_ADLER = 0xa1, OP_HT_CRC32 = 0xa2, OP_HT_ED2K = 0xa3,
  OP_HT_MD4 = 0xa4, OP_HT_MD5 = 0xa5, OP_HT_PANAMA = 0xa6, OP_HT_RIPEMD160 = 0xa7,
  OP_HT_SHA1 = 0xa8, OP_HT_SHA256 = 0xa9, OP_HT_SHA384 = 0xaa, OP_HT_SHA512 = 0xab,
  OP_HT_TIGER = 0xac, OP_HT_UUHASH = 0xad, OP_HT_UNKNOWN = 0xff
}
 Hash types and the relevant op codes. More...
enum  HashSetTypeIds { OP_HASHSET = 0xc0, OP_HS_FILEHASH = 0xc1, OP_HS_PARTHASH = 0xc2, OP_HS_PARTSIZE = 0xc3 }
enum  VMDOpCodes {
  OP_VMD = 0x40, OP_VMD_RUNTIME = 0x41, OP_VMD_FRAMES = 0x42, OP_VMD_FRAMERATE = 0x43,
  OP_VMD_FRAMESIZE = 0x44, OP_VMD_SUBTITLES = 0x45, OP_VMD_VIDSTREAM = 0x46, OP_VMD_AUDSTREAM = 0x47
}
 VideoMetaData opcodes. More...
enum  AMD_OpCodes {
  OP_AMD = 0x20, OP_AMD_TITLE = 0x21, OP_AMD_ARTIST = 0x22, OP_AMD_ALBUM = 0x23,
  OP_AMD_GENRE = 0x24, OP_AMD_COMMENT = 0x25, OP_AMD_COMPOSER = 0x26, OP_AMD_ORIGARTIST = 0x27,
  OP_AMD_COPYRIGHT = 0x28, OP_AMD_URL = 0x29, OP_AMD_ENCODED = 0x2a, OP_AMD_YEAR = 0x2b
}
 AudioMetaData opcodes. More...
enum  ARMDOpCodes {
  OP_ARMD = 0x60, OP_ARMD_FORMAT = 0x61, OP_ARMD_FILES = 0x62, OP_ARMD_UNCOMPR = 0x63,
  OP_ARMD_RATIO = 0x64, OP_ARMD_COMMENT = 0x65, OP_ARMD_PASSWORD = 0x66
}
 ArchiveMetaData tags. More...
enum  IMDOpCodes {
  OP_IMD = 0x80, OP_IMD_FORMAT = 0x81, OP_IMD_WIDTH = 0x82, OP_IMD_HEIGHT = 0x83,
  OP_IMD_DATE = 0x84, OP_IMD_COMMENT = 0x85
}
 ImageMetaData opcodes. More...
enum  MetaDataOpCodes {
  OP_METADATA = 0x90, OP_MD_FILENAME = 0x91, OP_MD_FILESIZE = 0x92, OP_MD_MODDATE = 0x93,
  OP_MD_FILETYPE = 0x94, OP_MD_TYPEGUESSED = 0x95
}
 MetaData opcodes. More...
enum  { OP_RANGE = 0x10 }
enum  { OP_RANGELIST = 0x11 }

Functions

HashBaseloadHash (std::istream &i)
 Load a hash from stream.
void invalidType (uint8_t x, uint8_t y)
HashSetBaseloadHashSet (std::istream &i)
 Load HashSet from stream.

Enumeration Type Documentation

anonymous enum
 

Enumeration values:
OP_RANGE 

Definition at line 31 of file range.h.

anonymous enum
 

Enumeration values:
OP_RANGELIST 

Definition at line 28 of file rangelist.h.

enum AMD_OpCodes
 

AudioMetaData opcodes.

Enumeration values:
OP_AMD  AudioMetaData.
OP_AMD_TITLE  <string> Title
OP_AMD_ARTIST  <string> Artist
OP_AMD_ALBUM  <string> Album
OP_AMD_GENRE  <string> Genre
OP_AMD_COMMENT  <string> Comment
OP_AMD_COMPOSER  <string> Composer
OP_AMD_ORIGARTIST  <string> Original artist
OP_AMD_COPYRIGHT  <string> Copyright
OP_AMD_URL  <string> Web URL
OP_AMD_ENCODED  <string> Encoded
OP_AMD_YEAR  <uint16> Year

Definition at line 171 of file metadata.h.

enum ARMDOpCodes
 

ArchiveMetaData tags.

Enumeration values:
OP_ARMD  ArchiveMetaData.
OP_ARMD_FORMAT  <uint32> Format
OP_ARMD_FILES  <uint32> File count
OP_ARMD_UNCOMPR  <uint64> Uncompressed size
OP_ARMD_RATIO  <float> Compression ratio
OP_ARMD_COMMENT  <string> Comment
OP_ARMD_PASSWORD  <bool> If password is set

Definition at line 276 of file metadata.h.

enum HashSetTypeIds
 

Enumeration values:
OP_HASHSET  Hashset.
OP_HS_FILEHASH  <hash>filehash
OP_HS_PARTHASH  <hash>chunkhash
OP_HS_PARTSIZE  <uint32_t>chunksize

Definition at line 287 of file hash.h.

enum HashTypeId
 

Hash types and the relevant op codes.

Enumeration values:
OP_HASH  Hash object.
OP_HT_ADLER  length = 4
OP_HT_CRC32  length = 4
OP_HT_ED2K  length = 16
OP_HT_MD4  length = 16
OP_HT_MD5  length = 20
OP_HT_PANAMA  length = 32
OP_HT_RIPEMD160  length = 20
OP_HT_SHA1  length = 20
OP_HT_SHA256  length = 32
OP_HT_SHA384  length = 48
OP_HT_SHA512  length = 64
OP_HT_TIGER  length = 24
OP_HT_UUHASH  length = ??
OP_HT_UNKNOWN  unknown/userdefined/invalid

Definition at line 76 of file hash.h.

enum IMDOpCodes
 

ImageMetaData opcodes.

Enumeration values:
OP_IMD  ImageMetaData.
OP_IMD_FORMAT  <uint32> Format
OP_IMD_WIDTH  <uint32> Height
OP_IMD_HEIGHT  <uint32> Width
OP_IMD_DATE  <uint32> Creation date
OP_IMD_COMMENT  <string> Comment

Definition at line 343 of file metadata.h.

enum MetaDataOpCodes
 

MetaData opcodes.

Enumeration values:
OP_METADATA  MetaData.
OP_MD_FILENAME  <string> File Name
OP_MD_FILESIZE  <uint64> size
OP_MD_MODDATE  <uint32> modification date
OP_MD_FILETYPE  <uint32> file type
OP_MD_TYPEGUESSED  <bool> if type has been guessed

Definition at line 417 of file metadata.h.

enum PartDataOpCodes
 

Opcodes used within PartData object I/O between streams.

Enumeration values:
OP_PD_VER  uint8 File version
OP_PARTDATA  uint8 PartData object
OP_PD_DOWNLOADED  uint64 Downloaded data
OP_PD_DESTINATION  string Destination location
OP_PD_COMPLETED  FullRangeList completed ranges.
OP_PD_HASHSET  FullRangeList<HashBase*> hashset.

Definition at line 45 of file partdata.cpp.

enum VMDOpCodes
 

VideoMetaData opcodes.

Enumeration values:
OP_VMD  VideoMetaData.
OP_VMD_RUNTIME  <uint32> Runtime
OP_VMD_FRAMES  <uint32> Frame count
OP_VMD_FRAMERATE  <float> Frame rate (fps)
OP_VMD_FRAMESIZE  <uint32><uint32> Frame size
OP_VMD_SUBTITLES  <uint16> Subtitle count
OP_VMD_VIDSTREAM  <streamdata> Video stream
OP_VMD_AUDSTREAM  <streamdata> Audio stream

Definition at line 77 of file metadata.h.


Function Documentation

void invalidType uint8_t  x,
uint8_t  y
[inline]
 

Definition at line 47 of file hash.cpp.

References Utils::hexDump().

Referenced by loadHashSet().

Here is the call graph for this function:

HashBase * CGComm::loadHash std::istream &  i  ) 
 

Load a hash from stream.

Definition at line 26 of file hash.cpp.

References OP_HT_ED2K, OP_HT_MD4, OP_HT_MD5, and OP_HT_SHA1.

HashSetBase * CGComm::loadHashSet std::istream &  i  ) 
 

Load HashSet from stream.

Todo:
This must be one the ugliest constructs I'v ever seen ... it _probably_ could be done in a much nicer way than nested duplicating switch statements...

Definition at line 60 of file hash.cpp.

References invalidType(), logTrace(), OP_HT_ED2K, OP_HT_MD4, OP_HT_MD5, OP_HT_SHA1, and TRACE_HASH.

Referenced by MetaData::MetaData().

Here is the call graph for this function: