epoc-httpurl.hpp

Go to the documentation of this file.
00001 #ifndef __epoc_httpurl_hpp__
00002 #define __epoc_httpurl_hpp__
00003 
00004 #include "application_config.h"
00005 
00006 #if __HTTPURL_ENABLED__
00007 
00008 #include "ac_app_context.h"
00009 #include "ld_log_db.h"
00010 #include "utils_cl2.h"
00011 
00012 #include "common/epoc-session.hpp"
00013 
00014 #include <badesca.h>
00015 #include <e32property.h>
00016 
00017 NONSHARABLE_CLASS(CSensor_httpurl) :
00018   public CActive
00019 {
00020  public: 
00021   static CSensor_httpurl* NewLC(ac_AppContext* aAppContext);
00022   static CSensor_httpurl* NewL(ac_AppContext* aAppContext);
00023   virtual ~CSensor_httpurl();
00024 
00025  private:
00026   CSensor_httpurl(ac_AppContext* aAppContext);
00027   void ConstructL();
00028 
00029  private:
00030   ac_AppContext* iAppContext; // not owned
00031   DEF_SESSION(RProperty, iProperty);
00032 
00033  private:
00034   LogDb* GetLogDb() const { return ac_LogDb(iAppContext); }
00035 
00036   void MakeRequest();
00037 
00038  private: // CActive
00039   virtual void DoCancel();
00040   virtual TInt RunError(TInt errCode);
00041   virtual void RunL();
00042 };
00043 
00044 #endif // __HTTPURL_ENABLED__
00045 
00046 // --------------------------------------------------
00047 // sensor array integration
00048 // --------------------------------------------------
00049 
00050 #if defined(SA_ARRAY_INTEGRATION)
00051 #if __HTTPURL_ENABLED__
00052 #define DECLARE_SENSOR_httpurl CSensor_httpurl* iSensor_httpurl
00053 #define SENSOR_HTTPURL_DESTROY DELETE_Z(self->iSensor_httpurl)
00054 #define SENSOR_HTTPURL_CREATE 
00055 #define SENSOR_HTTPURL_START sa_typical_symbian_sensor_create(self->iSensor_httpurl = CSensor_httpurl::NewL(self->ac), "httpurl sensor initialization")
00056 #define SENSOR_HTTPURL_STOP SENSOR_HTTPURL_DESTROY
00057 #define SENSOR_HTTPURL_IS_RUNNING (self->iSensor_httpurl != NULL)
00058 #define SENSOR_HTTPURL_RECONFIGURE(key, value) sa_reconfigure_ignore_all_keys
00059 #else
00060 #define DECLARE_SENSOR_httpurl
00061 #endif
00062 #endif /* SA_ARRAY_INTEGRATION */
00063 
00064 #endif /* __epoc_httpurl_hpp__ */
00065 
00066 /**
00067 
00068 epoc-httpurl.hpp
00069 
00070 Copyright 2009-2010 Helsinki Institute for Information Technology
00071 (HIIT) and the authors. All rights reserved.
00072 
00073 Authors: Tero Hasu <tero.hasu@hut.fi>
00074 
00075 Permission is hereby granted, free of charge, to any person
00076 obtaining a copy of this software and associated documentation files
00077 (the "Software"), to deal in the Software without restriction,
00078 including without limitation the rights to use, copy, modify, merge,
00079 publish, distribute, sublicense, and/or sell copies of the Software,
00080 and to permit persons to whom the Software is furnished to do so,
00081 subject to the following conditions:
00082 
00083 The above copyright notice and this permission notice shall be
00084 included in all copies or substantial portions of the Software.
00085 
00086 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00087 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00088 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00089 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
00090 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00091 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00092 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00093 SOFTWARE.
00094 
00095  **/

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:52 2011 by Doxygen 1.6.1