| // Copyright 2019 The Fuchsia Authors. All rights reserved. | 
 | // Use of this source code is governed by a BSD-style license that can be | 
 | // found in the LICENSE file. | 
 | library fuchsia.hardware.block.partition; | 
 | using zx; | 
 | using fuchsia.hardware.block as block; | 
 |  | 
 | const GUID_LENGTH uint32 = 16; | 
 | const NAME_LENGTH uint32 = 128; | 
 |  | 
 | /// A Globally Unique IDentifier, which may be utilized to identify | 
 | /// a partition. | 
 | type Guid = struct { | 
 |     value array<uint8, GUID_LENGTH>; | 
 | }; | 
 |  | 
 | /// Partition describes a region of one or more block devices, labelled | 
 | /// with distinguishing identifiers. | 
 | closed protocol Partition { | 
 |     compose block.Block; | 
 |  | 
 |     /// Gets the type GUID of the partition (if one exists). | 
 |     /// If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned. | 
 |     strict GetTypeGuid() -> (struct { | 
 |         status zx.Status; | 
 |         guid box<Guid>; | 
 |     }); | 
 |  | 
 |     /// Gets the instance GUID of the partition (if one exists). | 
 |     /// If the partition has no instance GUID, ZX_ERR_NOT_SUPPORTED is returned. | 
 |     strict GetInstanceGuid() -> (struct { | 
 |         status zx.Status; | 
 |         guid box<Guid>; | 
 |     }); | 
 |  | 
 |     /// Gets the name of the partition (if one exists). | 
 |     /// If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned. | 
 |     strict GetName() -> (struct { | 
 |         status zx.Status; | 
 |         name string:<NAME_LENGTH, optional>; | 
 |     }); | 
 | }; |