VirtualBox

Ignore:
Timestamp:
Jul 16, 2012 8:28:47 PM (13 years ago)
Author:
vboxsync
Message:

Guest Control 2.0: Update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h

    r42160 r42171  
    4848typedef std::vector <LONG> ProcessAffinity;
    4949typedef std::vector <Utf8Str> ProcessArguments;
    50 typedef std::map <Utf8Str, Utf8Str> ProcessEnvironmentMap;
    5150
    5251
     
    108107};
    109108
     109typedef std::vector <Utf8Str> GuestEnvironmentArray;
     110class GuestEnvironment
     111{
     112public:
     113
     114    int BuildEnvironmentBlock(void **ppvEnv, uint32_t *pcbEnv, uint32_t *pcEnvVars);
     115
     116    void Clear(void);
     117
     118    int CopyFrom(const GuestEnvironmentArray &environment);
     119
     120    int CopyTo(GuestEnvironmentArray &environment);
     121
     122    static void FreeEnvironmentBlock(void *pvEnv);
     123
     124    Utf8Str Get(size_t nPos);
     125
     126    bool Has(const Utf8Str &strKey);
     127
     128    int Set(const Utf8Str &strKey, const Utf8Str &strValue);
     129
     130    int Set(const Utf8Str &strPair);
     131
     132    size_t Size(void);
     133
     134    int Unset(const Utf8Str &strKey);
     135
     136public:
     137
     138    GuestEnvironment& operator=(const GuestEnvironmentArray &that);
     139
     140    GuestEnvironment& operator=(const GuestEnvironment &that);
     141
     142protected:
     143
     144    int appendToEnvBlock(const char *pszEnv, void **ppvList, uint32_t *pcbList, uint32_t *pcEnvVars);
     145
     146protected:
     147
     148    std::map <Utf8Str, Utf8Str> mEnvironment;
     149};
     150
     151
    110152/**
    111153 * Structure for keeping all the relevant process
     
    116158    Utf8Str                     mCommand;
    117159    ProcessArguments            mArguments;
    118     ProcessEnvironmentMap       mEnvironment;
     160    GuestEnvironment            mEnvironment;
    119161    uint32_t                    mFlags;
    120162    ULONG                       mTimeoutMS;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette