libcollection 0.1.3
|
00001 /* 00002 QUEUE 00003 00004 Header file for queue implemented using collection interface. 00005 00006 Copyright (C) Dmitri Pal <dpal@redhat.com> 2009 00007 00008 Collection Library is free software: you can redistribute it and/or modify 00009 it under the terms of the GNU Lesser General Public License as published by 00010 the Free Software Foundation, either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 Collection Library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public License 00019 along with Collection Library. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 #ifndef COLLECTION_QUEUE_H 00023 #define COLLECTION_QUEUE_H 00024 00025 #include "collection.h" 00026 00037 #define COL_CLASS_QUEUE 40000 00038 00039 #define COL_NAME_QUEUE "queue" 00040 00052 int col_create_queue(struct collection_item **queue); 00053 00062 void col_destroy_queue(struct collection_item *queue); 00063 00096 int col_enqueue_str_property(struct collection_item *queue, 00097 const char *property, 00098 const char *string, 00099 int length); 00121 int col_enqueue_binary_property(struct collection_item *queue, 00122 const char *property, 00123 void *binary_data, 00124 int length); 00145 int col_enqueue_int_property(struct collection_item *queue, 00146 const char *property, 00147 int32_t number); 00168 int col_enqueue_unsigned_property(struct collection_item *queue, 00169 const char *property, 00170 uint32_t number); 00191 int col_enqueue_long_property(struct collection_item *queue, 00192 const char *property, 00193 int64_t number); 00214 int col_enqueue_ulong_property(struct collection_item *queue, 00215 const char *property, 00216 uint64_t number); 00237 int col_enqueue_double_property(struct collection_item *queue, 00238 const char *property, 00239 double number); 00260 int col_enqueue_bool_property(struct collection_item *queue, 00261 const char *property, 00262 unsigned char logical); 00263 00287 int col_enqueue_any_property(struct collection_item *queue, 00288 const char *property, 00289 int type, 00290 void *data, 00291 int length); 00292 00303 int col_enqueue_item(struct collection_item *queue, 00304 struct collection_item *item); 00305 00319 int col_dequeue_item(struct collection_item *queue, 00320 struct collection_item **item); 00321 00322 00323 #endif