Skip to content
Snippets Groups Projects
Select Git revision
  • c52dc124409a5b00d9e7b5beaa4f4b361f2a9fd6
  • master default
  • mingw_gcc44
  • release_ABP1_012
  • release_ABP1_008
  • release_ABP1_006
  • release_ABP1_007
  • release_ABP1_005
  • release_ABP1_004
  • release_ABP1_003
  • pre_release_0.15
  • release_ABP1_001
  • release_ABP1_002
  • pre_release_0.13
  • pre_release_0.14
  • pre_release_0.11
  • pre_release_0.12
  • pre_release_0.10
  • pre_release_0.09
  • pre_release_0.08
20 results

BOINCClientAdapter.h

Blame
  • Forked from einsteinathome / graphicsframework
    Source project has a limited visibility.
    • Oliver Bock's avatar
      97a1dc47
      Refactored the BOINC client/application communication layer · 97a1dc47
      Oliver Bock authored
      * Now there's a generic and science application specific (e.g. shared memory handling) part
      * The actual shared memory indentifier now has to be passed during initialize() instead of being hard-coded
      * All this might eventually allow us to incorporate some portions of this API into something more general like a generic graphics toolkit
      97a1dc47
      History
      Refactored the BOINC client/application communication layer
      Oliver Bock authored
      * Now there's a generic and science application specific (e.g. shared memory handling) part
      * The actual shared memory indentifier now has to be passed during initialize() instead of being hard-coded
      * All this might eventually allow us to incorporate some portions of this API into something more general like a generic graphics toolkit
    BOINCClientAdapter.h 4.69 KiB
    #ifndef BOINCCLIENTADAPTER_H_
    #define BOINCCLIENTADAPTER_H_
    
    #include <iostream>
    #include <string>
    #include <sstream>
    
    #include "boinc_api.h"
    #include "graphics2.h"
    
    using namespace std;
    
    /**
     * \brief Adapter class which facilitates communications with the BOINC client
     * 
     * This adapter class can be used to query the BOINC core client for information
     * about the user and the running science application instance.
     * 
     * \author Oliver Bock\n
     * Max-Planck-Institute for Gravitational Physics\n
     * Hannover, Germany
     */
    class BOINCClientAdapter
    {
    public:
    	/// Default constructor
    	BOINCClientAdapter();
    	
    	/// Destructor
    	virtual ~BOINCClientAdapter();
    
    	/**
    	 * \brief Initializes the BOINC client adapter instance
    	 * 
    	 * This method has to be called first, otherwise no data will be returned when requested!
    	 */
    	void initialize(string sharedMemoryIdentifier);
    	
    	/**
    	 * \brief Refreshes dynamic data (e.g. search information)
    	 * 
    	 * You want to call this method periodically to refresh any volatile client information.
    	 * Please make sure that you call initialize() first!
    	 * 	
    	 * \see AbstractGraphicsEngine::refreshBOINCInformation
    	 * \see initialize
    	 */
    	void refresh();
    	
    	/**
    	 * \brief Retrieves the BOINC core client version of the currently active client
    	 * 
    	 * \return The BOINC core client version
    	 */
    	string coreVersion() const;
    	
    	/**
    	 * \brief Retrieves the \b Einstein\@Home application name of the currently active work unit
    	 * 
    	 * \return The \b Einstein\@Home application name
    	 */
    	string applicationName() const;
    	
    	/**
    	 * \brief Retrieves the \b Einstein\@Home application version of the currently active work unit
    	 * 
    	 * \return The \b Einstein\@Home application version
    	 */
    	string applicationVersion() const;