copyright : (C) 2008 by Marek Vavruša
email : opensource@intra2net.com and marek@vavrusa.com
***************************************************************************/
+/*
+Copyright (C) 2008 by Marek Vavruša
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU Lesser General Public License *
- * version 2.1 as published by the Free Software Foundation; *
- * *
- ***************************************************************************/
+The software in this package is distributed under the GNU General
+Public License version 2 (with a special exception described below).
+
+A copy of GNU General Public License (GPL) is included in this distribution,
+in the file COPYING.GPL.
+As a special exception, if other files instantiate templates or use macros
+or inline functions from this file, or you compile this file and link it
+with other works to produce a work based on this file, this file
+does not by itself cause the resulting work to be covered
+by the GNU General Public License.
+
+However the source code for this file must still be made available
+in accordance with section (3) of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based
+on this file might be covered by the GNU General Public License.
+*/
#ifndef __libftdi_hpp__
#define __libftdi_hpp__
boost::shared_ptr<Private> d;
};
-typedef std::list<Context> ListBase;
-
/*! \brief Device list.
*/
-class List : public ListBase
+class List
{
public:
List(struct ftdi_device_list* devlist = 0);
static List* find_all(int vendor, int product);
+ /*! List size */
+ int size();
+
+ /*! Append element */
+ void push_back(const Context& element);
+ void append(const Context& element)
+ { push_back(element); }
+
+ /*! Prepend element */
+ void push_front(const Context& element);
+ void prepend(const Context& element)
+ { push_front(element); }
+
+ /*! Clear list */
+ void clear();
+
+ /* Iterators */
+ typedef std::list<Context>::iterator iterator;
+ std::list<Context>::iterator begin();
+ std::list<Context>::iterator end();
+
+
private:
class Private;
boost::shared_ptr<Private> d;