1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_COMMON_MEDIA_GALLERIES_PMP_CONSTANTS_H_ 6 #define CHROME_COMMON_MEDIA_GALLERIES_PMP_CONSTANTS_H_ 7 8 #include <string> 9 10 #include "base/basictypes.h" 11 #include "base/time/time.h" 12 13 namespace picasa { 14 15 // PMP file format. 16 // Info derived from: http://sbktech.blogspot.com/2011/12/picasa-pmp-format.html 17 18 const char kPmpExtension[] = "pmp"; 19 20 const base::Time::Exploded kPmpVariantTimeEpoch = { 21 1899, 12, 7, 30, // Dec 30, 1899 (Saturday) 22 0, 0, 0, 0 // 00:00:00.000 23 }; 24 25 const int64 kPmpHeaderSize = 20; 26 27 const int kPmpMagic1Offset = 0; 28 const int kPmpMagic2Offset = 6; 29 const int kPmpMagic3Offset = 8; 30 const int kPmpMagic4Offset = 14; 31 32 const uint32 kPmpMagic1 = 0x3fcccccd; 33 const uint16 kPmpMagic2 = 0x1332; 34 const uint32 kPmpMagic3 = 0x00000002; 35 const uint16 kPmpMagic4 = 0x1332; 36 37 const int kPmpFieldType1Offset = 4; 38 const int kPmpFieldType2Offset = 12; 39 const int kPmpRowCountOffset = 16; 40 41 enum PmpFieldType { 42 PMP_TYPE_STRING = 0x00, 43 PMP_TYPE_UINT32 = 0x01, 44 PMP_TYPE_DOUBLE64 = 0x02, 45 PMP_TYPE_UINT8 = 0x03, 46 PMP_TYPE_UINT64 = 0x04, 47 PMP_TYPE_INVALID = 0xff 48 }; 49 50 } // namespace picasa 51 52 #endif // CHROME_COMMON_MEDIA_GALLERIES_PMP_CONSTANTS_H_ 53