1bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// Copyright (c) 2006, Google Inc. 2bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// All rights reserved. 3bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// 4bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// Redistribution and use in source and binary forms, with or without 5bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// modification, are permitted provided that the following conditions are 6bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// met: 7bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// 8bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// * Redistributions of source code must retain the above copyright 9bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// notice, this list of conditions and the following disclaimer. 10bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// * Redistributions in binary form must reproduce the above 11bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// copyright notice, this list of conditions and the following disclaimer 12bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// in the documentation and/or other materials provided with the 13bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// distribution. 14bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// * Neither the name of Google Inc. nor the names of its 15bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// contributors may be used to endorse or promote products derived from 16bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// this software without specific prior written permission. 17bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// 18bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly 30bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly#ifndef COMMON_LINUX_GUID_CREATOR_H__ 31bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly#define COMMON_LINUX_GUID_CREATOR_H__ 32bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly 33bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly#include "google_breakpad/common/minidump_format.h" 34bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly 35bcd46f007919b5063164c8c5c6c2bd4dfb62681elulytypedef MDGUID GUID; 36bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly 37bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// Format string for parsing GUID. 38bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly#define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x" 39bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// Length of GUID string. Don't count the ending '\0'. 40bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly#define kGUIDStringLength 36 41bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly 42bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// Create a guid. 43bcd46f007919b5063164c8c5c6c2bd4dfb62681elulybool CreateGUID(GUID *guid); 44bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly 45bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly// Get the string from guid. 46bcd46f007919b5063164c8c5c6c2bd4dfb62681elulybool GUIDToString(const GUID *guid, char *buf, int buf_len); 47bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly 48bcd46f007919b5063164c8c5c6c2bd4dfb62681eluly#endif 49