compress.h

00001 /***************************************************************
00002  *
00003  * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
00004  * University of Wisconsin-Madison, WI.
00005  * 
00006  * Licensed under the Apache License, Version 2.0 (the "License"); you
00007  * may not use this file except in compliance with the License.  You may
00008  * obtain a copy of the License at
00009  * 
00010  *    http://www.apache.org/licenses/LICENSE-2.0
00011  * 
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  *
00018  ***************************************************************/
00019 
00020 
00021 
00022 #if !defined( COMPRESS_H )
00023 #define COMPRESS_H
00024 
00025 #include "classad/classad_stl.h"
00026 #include "classad/classad.h"
00027 
00028 BEGIN_NAMESPACE(classad)
00029 
00030 class ClassAdBin
00031 {
00032     public:
00033     ClassAdBin( );
00034     ~ClassAdBin( );
00035 
00036     int         count;
00037     ClassAd     *ad;
00038 };
00039 
00040 typedef classad_hash_map< std::string, ClassAdBin* > CompressedAds;
00041 
00042 bool MakeSignature( ClassAd *ad, References &refs, std::string &sig );
00043 bool Compress( ClassAdCollectionServer *server, LocalCollectionQuery *query,
00044                const References &refs, CompressedAds& comp, 
00045                std::list<ClassAd*> &rest);
00046 
00047 END_NAMESPACE
00048 #endif
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends