/* * $Id$ * * Copyright (c) 2011 Surfnet * Copyright (c) 2011 .SE (The Internet Infrastructure Foundation). * Copyright (c) 2011 OpenDNSSEC AB (svb) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ import "google/protobuf/descriptor.proto"; // Extended meta-data on a protocol buffer message field. // The 'xml' meta-data option when set on a field is merged into // the generated C++ code and can be accessed by the xml import code. // The 'xml' option is a field option that allows specifying 2 aspects: // 1. The xml path from which this field is imported // 2. A specific xml type when the xml data is not text that can be automatically converted. extend google.protobuf.FieldOptions { optional xmloption xml = 50000; } message xmloption { // Relative xml path w.r.t. parent element where this field is stored in // xml e.g. element "Validity/From" or attribute "Algorithm/@saltlength" required string path = 1; // Conversions to specific field types are done from text // automatically unless explicit xml type is given. optional xmltype type = 2 [default = text]; } enum xmltype { // The xml data does not have an explicit type. // The text will be interpreted when it is assigned to a message field text = 1; // ISO 8601 Data elements and interchange formats — Information interchange — Representation of dates and times // The textual representation of the duration e.g. 'PT2H' will be converted to a time_t value that can // then be assigned to numeric fields i.e. int32,int64,uint32,uint64,double,float etc. Trying to assign it // to a string,bool,enum or message field is not allowed and will report an error. duration = 2; }