MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / AddFormat

Method AddFormat

Plugins/FreeRDP/Client/ClipboardMimeData.cpp:199–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199int CClipboardMimeData::AddFormat(UINT32 id, const char *name)
200{
201 int nRet = 0;
202
203 foreach(auto it, m_Formats)
204 {
205 if(it.id == id)
206 {
207 qWarning(log) << "Repeat format id:" << id;
208 return -1;
209 }
210
211 if(name)
212 {
213 if(name == it.name)
214 {
215 qWarning(log) << "Repeat format name:" << name;
216 return -2;
217 }
218 }
219 }
220
221 _FORMAT f = {id, name, id};
222 if(name)
223 {
224 f.localId = ClipboardRegisterFormat(m_pClipboard, name);
225 }
226
227 m_Formats.push_back(f);
228
229 return nRet;
230}
231
232bool CClipboardMimeData::hasFormat(const QString &mimetype) const
233{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected