Chromium Code Reviews| Index: webkit/fileapi/media/picasa/pmp_constants.h |
| diff --git a/webkit/fileapi/media/picasa/pmp_constants.h b/webkit/fileapi/media/picasa/pmp_constants.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bda2999964ab44ca4ab14bd2873e3f9aa6adfc4f |
| --- /dev/null |
| +++ b/webkit/fileapi/media/picasa/pmp_constants.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |
| +#define WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/basictypes.h" |
| + |
| +namespace picasaimport { |
| + |
| +// PMP file format. |
| +// Info derived from: http://sbktech.blogspot.com/2011/12/picasa-pmp-format.html |
| + |
| +const std::string kPmpExtension = "pmp"; |
| + |
| +const size_t kPmpHeaderSize = 20; |
| + |
| +const int kPmpMagic1Offset = 0; |
| +const int kPmpMagic2Offset = 6; |
| +const int kPmpMagic3Offset = 8; |
| +const int kPmpMagic4Offset = 14; |
| + |
| +const uint32 kPmpMagic1 = 0x3fcccccd; |
| +const uint16 kPmpMagic2 = 0x1332; |
| +const uint32 kPmpMagic3 = 0x00000002; |
| +const uint16 kPmpMagic4 = 0x1332; |
| + |
| +const int kPmpFieldType1Offset = 4; |
| +const int kPmpFieldType2Offset = 12; |
| +const int kPmpRowCountOffset = 16; |
| + |
| +enum PmpFieldType { |
| + STRING_TYPE = 0x00, |
|
vandebo (ex-Chrome)
2013/04/02 22:17:58
Style guide says we prefer to name enum elements l
tommycli
2013/04/05 16:49:24
http://dev.chromium.org/developers/coding-style#Na
vandebo (ex-Chrome)
2013/04/05 18:52:47
Oops... Chrome style guide wins. But the names sh
tommycli
2013/04/05 20:06:44
Done.
|
| + UINT32_TYPE = 0x01, |
| + DOUBLE64_TYPE = 0x02, |
| + UINT8_TYPE = 0x03, |
| + UINT64_TYPE = 0x04, |
| + INVALID_TYPE = 0xff |
| +}; |
| + |
| +} // namespace picasaimport |
| + |
| +#endif // WEBKIT_FILEAPI_MEDIA_PICASA_PMP_CONSTANTS_H_ |