Changeset b21f30b in nscp


Ignore:
Timestamp:
11/10/09 19:49:47 (4 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2
Children:
2677e15
Parents:
b4ab033
Message:

removed com helpers

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • include/settings/settings_ini.hpp

    r773ad32 rb21f30b  
    44#include <map> 
    55#include <settings/Settings.h> 
    6 #include <simpleini/SimpleIni.h> 
     6#include <simpleini/simpleini.h> 
    77#include <error.hpp> 
    88 
  • service/NSClient++.cpp

    rb4ab033 rb21f30b  
    2525//#ifdef DEBUG 
    2626#include <crtdbg.h> 
    27 #include "boost/filesystem.hpp"  
    2827//#endif 
    2928#endif 
     
    798797  } 
    799798*/ 
     799#ifdef WIN32 
    800800  try { 
    801801    com_helper_.initialize(); 
     
    807807    return false; 
    808808  } 
     809#endif 
    809810  if (boot) { 
    810811    try { 
     
    912913    } 
    913914  } 
     915#ifdef WIN32 
    914916  LOG_DEBUG_STD(_T("Stopping: COM helper")); 
    915917  try { 
     
    920922    LOG_ERROR_STD(_T("Unknown exception uniniating COM...")); 
    921923  } 
     924#endif 
    922925  /* 
    923926  LOG_DEBUG_STD(_T("Stopping: Socket Helpers")); 
  • service/NSClient++.h

    r773ad32 rb21f30b  
    2828//#include <MutexRW.h> 
    2929#include <map> 
     30#ifdef WIN32 
    3031#include <com_helpers.hpp> 
     32#endif 
    3133//#include <nsclient_session.hpp> 
    3234#include <boost/thread/thread.hpp> 
    3335#include <boost/thread/locks.hpp> 
    3436#include <boost/thread/shared_mutex.hpp> 
    35  
    3637 
    3738/** 
     
    108109  typedef enum log_status {log_unknown, log_looking, log_debug, log_nodebug }; 
    109110  log_status debug_; 
     111#ifdef WIN32 
    110112  com_helper::initialize_com com_helper_; 
     113#endif 
    111114  /* 
    112115  std::auto_ptr<nsclient_session::shared_client_session> shared_client_; 
     
    192195std::wstring Decrypt(std::wstring str, unsigned int algorithm = NSCAPI::encryption_xor); 
    193196 
     197#ifndef __FILEW__ 
     198#define R(x) _T(x) 
     199#define __FILEW__ R(__FILE__) 
     200#endif 
    194201////////////////////////////////////////////////////////////////////////// 
    195202// Log macros to simplify logging 
     
    199206#define LOG_ERROR_STD(msg) LOG_ERROR(((std::wstring)msg).c_str()) 
    200207#define LOG_ERROR(msg) \ 
    201   NSAPIMessage(NSCAPI::error, _T(__FILE__), __LINE__, msg) 
     208  NSAPIMessage(NSCAPI::error, __FILEW__, __LINE__, msg) 
    202209#define LOG_CRITICAL_STD(msg) LOG_CRITICAL(((std::wstring)msg).c_str()) 
    203210#define LOG_CRITICAL(msg) \ 
    204   NSAPIMessage(NSCAPI::critical, _T(__FILE__), __LINE__, msg) 
     211  NSAPIMessage(NSCAPI::critical, __FILEW__, __LINE__, msg) 
    205212#define LOG_MESSAGE_STD(msg) LOG_MESSAGE(((std::wstring)msg).c_str()) 
    206213#define LOG_MESSAGE(msg) \ 
    207   NSAPIMessage(NSCAPI::log, _T(__FILE__), __LINE__, msg) 
     214  NSAPIMessage(NSCAPI::log, __FILEW__, __LINE__, msg) 
    208215 
    209216#define LOG_DEBUG_STD(msg) LOG_DEBUG(((std::wstring)msg).c_str()) 
    210217#define LOG_DEBUG(msg) \ 
    211   NSAPIMessage(NSCAPI::debug, _T(__FILE__), __LINE__, msg) 
     218  NSAPIMessage(NSCAPI::debug, __FILEW__, __LINE__, msg) 
    212219/* 
    213220#define LOG_DEBUG_STD(msg) 
  • service/StdAfx.h

    rb4ab033 rb21f30b  
    2020***************************************************************************/ 
    2121#pragma once 
     22#include <types.hpp> 
     23 
    2224#ifdef WIN32 
    2325#define _WINSOCKAPI_ 
     
    4850 
    4951#include <boost/algorithm/string.hpp> 
     52#include <boost/filesystem.hpp> 
     53 
    5054#ifdef MEMCHECK 
    5155#include <vld.h> 
  • service/settings_manager_impl.h

    rd5356c1 rb21f30b  
    44#include <settings/Settings.h> 
    55#include <settings/settings_ini.hpp> 
     6#ifdef WIN32 
    67#include <settings/settings_old.hpp> 
    78#include <settings/settings_registry.hpp> 
     9#endif 
    810 
    911namespace settings_manager { 
     
    5961    Settings::SettingsInterface* create_instance(settings_type type, std::wstring context) { 
    6062      get_logger()->debug(__FILEW__, __LINE__, _T("Trying to create: ") + SettingsCore::type_to_string(type) + _T(": ") + context); 
     63#ifdef WIN32 
    6164      if (type == SettingsCore::old_ini_file) { 
    6265        old_ = true; 
    6366        return new Settings::OLDSettings(this, context); 
    6467      }  
     68      if (type == SettingsCore::registry) 
     69        return new Settings::REGSettings(this, context); 
     70#endif 
    6571      if (type == SettingsCore::ini_file) 
    6672        return new Settings::INISettings(this, context); 
    67       if (type == SettingsCore::registry) 
    68         return new Settings::REGSettings(this, context); 
    6973      throw SettingsException(_T("Undefined settings type: ") + SettingsCore::type_to_string(type)); 
    7074    } 
Note: See TracChangeset for help on using the changeset viewer.