id.h (1434B)
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20#ifndef __GUAC_ID_H 21#define __GUAC_ID_H 22 23/** 24 * Generates a guaranteed-unique identifier which is a total of 37 characters 25 * long, having the given single-character prefix. The resulting identifier 26 * must be freed with a call to guac_mem_free() when no longer needed. If an error 27 * occurs, NULL is returned, no memory is allocated, and guac_error is set 28 * appropriately. 29 * 30 * @param prefix 31 * The single-character prefix to use. 32 * 33 * @return 34 * A newly-allocated unique identifier with the given prefix, or NULL if 35 * the identifier could not be generated. 36 */ 37char* guac_generate_id(char prefix); 38 39#endif 40