Changeset 52442 in vbox for trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
- Timestamp:
- Aug 21, 2014 4:03:15 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95649
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
r52064 r52442 5 5 6 6 /* 7 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 4082 4082 4083 4083 #define IMPL_GETTER_BOOL(_aType, _aName, _aIndex) \ 4084 STDMETHODIMP VRDEServerInfo::COMGETTER(_aName)(_aType *a##_aName)\4084 HRESULT VRDEServerInfo::get##_aName(_aType *a##_aName) \ 4085 4085 { \ 4086 if (!a##_aName) \4087 return E_POINTER; \4088 \4089 AutoCaller autoCaller(this); \4090 if (FAILED(autoCaller.rc())) return autoCaller.rc(); \4091 \4092 4086 /* todo: Not sure if a AutoReadLock would be sufficient. */ \ 4093 4087 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); \ … … 4096 4090 uint32_t cbOut = 0; \ 4097 4091 \ 4098 mParent->i_consoleVRDPServer()->QueryInfo 4092 mParent->i_consoleVRDPServer()->QueryInfo \ 4099 4093 (_aIndex, &value, sizeof(value), &cbOut); \ 4100 4094 \ … … 4106 4100 4107 4101 #define IMPL_GETTER_SCALAR(_aType, _aName, _aIndex, _aValueMask) \ 4108 STDMETHODIMP VRDEServerInfo::COMGETTER(_aName)(_aType *a##_aName)\4102 HRESULT VRDEServerInfo::get##_aName(_aType *a##_aName) \ 4109 4103 { \ 4110 if (!a##_aName) \4111 return E_POINTER; \4112 \4113 AutoCaller autoCaller(this); \4114 if (FAILED(autoCaller.rc())) return autoCaller.rc(); \4115 \4116 4104 /* todo: Not sure if a AutoReadLock would be sufficient. */ \ 4117 4105 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); \ … … 4120 4108 uint32_t cbOut = 0; \ 4121 4109 \ 4122 mParent->i_consoleVRDPServer()->QueryInfo 4110 mParent->i_consoleVRDPServer()->QueryInfo \ 4123 4111 (_aIndex, &value, sizeof(value), &cbOut); \ 4124 4112 \ … … 4130 4118 extern void IMPL_GETTER_SCALAR_DUMMY(void) 4131 4119 4132 #define IMPL_GETTER_ BSTR(_aType, _aName, _aIndex)\4133 STDMETHODIMP VRDEServerInfo::COMGETTER(_aName)(_aType *a##_aName)\4120 #define IMPL_GETTER_UTF8STR(_aType, _aName, _aIndex) \ 4121 HRESULT VRDEServerInfo::get##_aName(_aType &a##_aName) \ 4134 4122 { \ 4135 if (!a##_aName) \4136 return E_POINTER; \4137 \4138 AutoCaller autoCaller(this); \4139 if (FAILED(autoCaller.rc())) return autoCaller.rc(); \4140 \4141 4123 /* todo: Not sure if a AutoReadLock would be sufficient. */ \ 4142 4124 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); \ … … 4144 4126 uint32_t cbOut = 0; \ 4145 4127 \ 4146 mParent->i_consoleVRDPServer()->QueryInfo 4128 mParent->i_consoleVRDPServer()->QueryInfo \ 4147 4129 (_aIndex, NULL, 0, &cbOut); \ 4148 4130 \ 4149 4131 if (cbOut == 0) \ 4150 4132 { \ 4151 Bstr str(""); \ 4152 str.cloneTo(a##_aName); \ 4133 a##_aName = Utf8Str::Empty; \ 4153 4134 return S_OK; \ 4154 4135 } \ … … 4164 4145 } \ 4165 4146 \ 4166 mParent->i_consoleVRDPServer()->QueryInfo 4147 mParent->i_consoleVRDPServer()->QueryInfo \ 4167 4148 (_aIndex, pchBuffer, cbOut, &cbOut); \ 4168 4149 \ 4169 Bstr str(pchBuffer); \ 4170 \ 4171 str.cloneTo(a##_aName); \ 4150 a##_aName = pchBuffer; \ 4172 4151 \ 4173 4152 RTMemTmpFree(pchBuffer); \ … … 4186 4165 IMPL_GETTER_SCALAR (LONG64, BytesReceived, VRDE_QI_BYTES_RECEIVED, INT64_MAX); 4187 4166 IMPL_GETTER_SCALAR (LONG64, BytesReceivedTotal, VRDE_QI_BYTES_RECEIVED_TOTAL, INT64_MAX); 4188 IMPL_GETTER_ BSTR (BSTR,User, VRDE_QI_USER);4189 IMPL_GETTER_ BSTR (BSTR,Domain, VRDE_QI_DOMAIN);4190 IMPL_GETTER_ BSTR (BSTR,ClientName, VRDE_QI_CLIENT_NAME);4191 IMPL_GETTER_ BSTR (BSTR,ClientIP, VRDE_QI_CLIENT_IP);4167 IMPL_GETTER_UTF8STR(Utf8Str, User, VRDE_QI_USER); 4168 IMPL_GETTER_UTF8STR(Utf8Str, Domain, VRDE_QI_DOMAIN); 4169 IMPL_GETTER_UTF8STR(Utf8Str, ClientName, VRDE_QI_CLIENT_NAME); 4170 IMPL_GETTER_UTF8STR(Utf8Str, ClientIP, VRDE_QI_CLIENT_IP); 4192 4171 IMPL_GETTER_SCALAR (ULONG, ClientVersion, VRDE_QI_CLIENT_VERSION, 0); 4193 4172 IMPL_GETTER_SCALAR (ULONG, EncryptionStyle, VRDE_QI_ENCRYPTION_STYLE, 0); 4194 4173 4195 #undef IMPL_GETTER_ BSTR4174 #undef IMPL_GETTER_UTF8STR 4196 4175 #undef IMPL_GETTER_SCALAR 4197 4176 #undef IMPL_GETTER_BOOL
Note:
See TracChangeset
for help on using the changeset viewer.