searchhandler.h

00001 /*
00002   Copyright (c) 2006 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 #ifndef SEARCHHANDLER_H__
00015 #define SEARCHHANDLER_H__
00016 
00017 #include "stanza.h"
00018 #include "dataform.h"
00019 
00020 #include <string>
00021 
00022 namespace gloox
00023 {
00024 
00029   struct SearchFieldStruct
00030   {
00031     std::string first;
00032     std::string last;
00033     std::string nick;
00034     std::string email;
00035     JID jid;
00036   };
00037 
00041   enum SearchFieldEnum
00042   {
00043     SearchFieldFirst    = 1,
00044     SearchFieldLast     = 2,
00045     SearchFieldNick     = 4,
00046     SearchFieldEmail    = 8
00047   };
00048 
00052   typedef std::list<SearchFieldStruct> SearchResultList;
00053 
00062   class GLOOX_API SearchHandler
00063   {
00064     public:
00068       virtual ~SearchHandler() {};
00069 
00077       virtual void handleSearchFields( const JID& directory, int fields, const std::string& instructions ) = 0;
00078 
00086       virtual void handleSearchFields( const JID& directory, DataForm *form ) = 0;
00087 
00093       virtual void handleSearchResult( const JID& directory, const SearchResultList& resultList ) = 0;
00094 
00101       virtual void handleSearchResult( const JID& directory, const DataForm *form ) = 0;
00102 
00108       virtual void handleSearchError( const JID& directory, Stanza *stanza ) = 0;
00109 
00110   };
00111 
00112 }
00113 
00114 #endif // SEARCHHANDLER_H__

Generated on Tue May 1 14:20:20 2007 for gloox by  doxygen 1.5.1