~ubuntu-branches/ubuntu/utopic/open-vm-tools/utopic

« back to all changes in this revision

Viewing changes to services/plugins/dndcp/dndGuest/dndRpcV3.cc

  • Committer: Package Import Robot
  • Author(s): Bernd Zeimetz, 31c30832
  • Date: 2014-01-08 20:28:33 UTC
  • mfrom: (1.4.14) (2.4.42 sid)
  • Revision ID: package-import@ubuntu.com-20140108202833-l0ycdpzq5ayadedn
Tags: 2:9.4.0-1280544-5
[31c30832] Revert "Enable building of vmci again."
This reverts commit 0d55577cd3c262dbbc2bf79593d6f500f84c4170.
Too fast upload, sorry. vmhgfs is indeed (still) broken with
vmci.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#endif
37
37
 
38
38
#include "dndRpcV3.hh"
39
 
#include "tracer.hh"
40
39
 
41
40
extern "C" {
42
41
   #include "debug.h"
80
79
void
81
80
DnDRpcV3::Init(void)
82
81
{
83
 
   TRACE_CALL();
 
82
   Debug("%s: entering.\n", __FUNCTION__);
84
83
   ASSERT(mTransport);
85
84
   mTransport->RegisterRpc(this, mTransportInterface);
86
85
}
99
98
DnDRpcV3::SrcDragEnterDone(int32 x,
100
99
                           int32 y)
101
100
{
102
 
   TRACE_CALL();
 
101
   Debug("%s: entering.\n", __FUNCTION__);
103
102
   return mUtil.SendMsg(DND_HG_DRAG_ENTER_DONE, x, y);
104
103
 
105
104
}
116
115
bool
117
116
DnDRpcV3::SrcDragBeginDone(uint32 sessionId)
118
117
{
119
 
   TRACE_CALL();
 
118
   Debug("%s: entering.\n", __FUNCTION__);
120
119
   return mUtil.SendMsg(DND_HG_DRAG_READY);
121
120
}
122
121
 
142
141
   DnDMsg_SetCmd(&msg, DND_HG_UPDATE_FEEDBACK);
143
142
 
144
143
   if (!DnDMsg_AppendArg(&msg, &feedback, sizeof feedback)) {
145
 
      g_debug("%s: DnDMsg_AppendData failed.\n", __FUNCTION__);
 
144
      Debug("%s: DnDMsg_AppendData failed.\n", __FUNCTION__);
146
145
      goto exit;
147
146
   }
148
147
 
165
164
bool
166
165
DnDRpcV3::SrcPrivDragEnter(uint32 sessionId)
167
166
{
168
 
   TRACE_CALL();
 
167
   Debug("%s: entering.\n", __FUNCTION__);
169
168
   return true;
170
169
}
171
170
 
185
184
                           int32 x,
186
185
                           int32 y)
187
186
{
188
 
   TRACE_CALL();
 
187
   Debug("%s: entering.\n", __FUNCTION__);
189
188
   return true;
190
189
}
191
190
 
205
204
                      int32 x,
206
205
                      int32 y)
207
206
{
208
 
   TRACE_CALL();
 
207
   Debug("%s: entering.\n", __FUNCTION__);
209
208
   return true;
210
209
}
211
210
 
225
224
                  int32 x,
226
225
                  int32 y)
227
226
{
228
 
   TRACE_CALL();
 
227
   Debug("%s: entering.\n", __FUNCTION__);
229
228
   return true;
230
229
}
231
230
 
248
247
   DnDMsg msg;
249
248
   bool ret = false;
250
249
 
251
 
   TRACE_CALL();
 
250
   Debug("%s: entering.\n", __FUNCTION__);
252
251
 
253
252
   DnDMsg_Init(&msg);
254
253
 
255
254
   /* Construct msg with both cmd CP_HG_START_FILE_COPY and stagingDirCP. */
256
255
   DnDMsg_SetCmd(&msg, DND_HG_DROP_DONE);
257
256
   if (!DnDMsg_AppendArg(&msg, (void *)stagingDirCP, sz)) {
258
 
      g_debug("%s: DnDMsg_AppendData failed.\n", __FUNCTION__);
 
257
      Debug("%s: DnDMsg_AppendData failed.\n", __FUNCTION__);
259
258
      goto exit;
260
259
   }
261
260
 
280
279
DnDRpcV3::DestDragEnter(uint32 sessionId,
281
280
                        const CPClipboard *clip)
282
281
{
283
 
   TRACE_CALL();
 
282
   Debug("%s: entering.\n", __FUNCTION__);
284
283
   return mUtil.SendMsg(DND_GH_DRAG_ENTER, clip);
285
284
}
286
285
 
298
297
DnDRpcV3::DestSendClip(uint32 sessionId,
299
298
                       const CPClipboard *clip)
300
299
{
301
 
   TRACE_CALL();
 
300
   Debug("%s: entering.\n", __FUNCTION__);
302
301
   return true;
303
302
}
304
303
 
314
313
bool
315
314
DnDRpcV3::DragNotPending(uint32 sessionId)
316
315
{
317
 
   TRACE_CALL();
 
316
   Debug("%s: entering.\n", __FUNCTION__);
318
317
   return mUtil.SendMsg(DND_GH_NOT_PENDING);
319
318
}
320
319
 
334
333
                        int32 x,
335
334
                        int32 y)
336
335
{
337
 
   TRACE_CALL();
 
336
   Debug("%s: entering.\n", __FUNCTION__);
338
337
   return true;
339
338
}
340
339
 
354
353
                   int32 x,
355
354
                   int32 y)
356
355
{
357
 
   TRACE_CALL();
 
356
   Debug("%s: entering.\n", __FUNCTION__);
358
357
   return true;
359
358
}
360
359
 
374
373
                       int32 x,
375
374
                       int32 y)
376
375
{
377
 
   TRACE_CALL();
 
376
   Debug("%s: entering.\n", __FUNCTION__);
378
377
   return true;
379
378
}
380
379
 
394
393
                            bool show,
395
394
                            uint32 unityWndId)
396
395
{
397
 
   TRACE_CALL();
 
396
   Debug("%s: entering.\n", __FUNCTION__);
398
397
   return true;
399
398
}
400
399
 
414
413
                    int32 x,
415
414
                    int32 y)
416
415
{
417
 
   TRACE_CALL();
 
416
   Debug("%s: entering.\n", __FUNCTION__);
418
417
   return true;
419
418
}
420
419
 
430
429
bool
431
430
DnDRpcV3::RequestFiles(uint32 sessionId)
432
431
{
433
 
   TRACE_CALL();
 
432
   Debug("%s: entering.\n", __FUNCTION__);
434
433
   return true;
435
434
}
436
435
 
452
451
                        const uint8 *stagingDirCP,
453
452
                        uint32 sz)
454
453
{
455
 
   TRACE_CALL();
 
454
   Debug("%s: entering.\n", __FUNCTION__);
456
455
   return true;
457
456
}
458
457
 
470
469
DnDRpcV3::GetFilesDone(uint32 sessionId,
471
470
                       bool success)
472
471
{
473
 
   TRACE_CALL();
 
472
   Debug("%s: entering.\n", __FUNCTION__);
474
473
   return true;
475
474
}
476
475
 
490
489
                     const uint8 *packet,
491
490
                     size_t length)
492
491
{
493
 
   TRACE_CALL();
 
492
   Debug("%s: entering.\n", __FUNCTION__);
494
493
   return mTransport->SendPacket(destId, mTransportInterface, packet, length);
495
494
}
496
495
 
516
515
 
517
516
   ret = DnDMsg_UnserializeHeader(&msg, (void *)binary, binarySize);
518
517
   if (DNDMSG_SUCCESS != ret) {
519
 
      g_debug("%s: DnDMsg_UnserializeHeader failed %d\n", __FUNCTION__, ret);
 
518
      Debug("%s: DnDMsg_UnserializeHeader failed %d\n", __FUNCTION__, ret);
520
519
      goto exit;
521
520
   }
522
521
 
524
523
                                (void *)(binary + DNDMSG_HEADERSIZE_V3),
525
524
                                binarySize - DNDMSG_HEADERSIZE_V3);
526
525
   if (DNDMSG_SUCCESS != ret) {
527
 
      g_debug("%s: DnDMsg_UnserializeArgs failed with %d\n", __FUNCTION__, ret);
 
526
      Debug("%s: DnDMsg_UnserializeArgs failed with %d\n", __FUNCTION__, ret);
528
527
      goto exit;
529
528
   }
530
529
 
531
 
   g_debug("%s: Got %d, binary size %d.\n", __FUNCTION__, DnDMsg_GetCmd(&msg),
532
 
           binarySize);
 
530
   Debug("%s: Got %d, binary size %d.\n",
 
531
         __FUNCTION__, DnDMsg_GetCmd(&msg), binarySize);
533
532
 
534
533
   /*
535
534
    * Translate command and emit signal. Session Id 1 is used because version
543
542
      /* Unserialize clipboard data for the command. */
544
543
      buf = DnDMsg_GetArg(&msg, 0);
545
544
      if (!CPClipboard_Unserialize(&mClipboard, DynBuf_Get(buf), DynBuf_GetSize(buf))) {
546
 
         g_debug("%s: CPClipboard_Unserialize failed.\n", __FUNCTION__);
 
545
         Debug("%s: CPClipboard_Unserialize failed.\n", __FUNCTION__);
547
546
         break;
548
547
      }
549
548
      SrcDragEnterDone(DRAG_DET_WINDOW_WIDTH / 2,
666
665
      break;
667
666
   }
668
667
   default:
669
 
      g_debug("%s: got unsupported new command %d.\n", __FUNCTION__,
670
 
              DnDMsg_GetCmd(&msg));
 
668
      Debug("%s: got unsupported new command %d.\n",
 
669
            __FUNCTION__, DnDMsg_GetCmd(&msg));
671
670
   }
672
671
exit:
673
672
   DnDMsg_Destroy(&msg);
687
686
                       const uint8 *packet,
688
687
                       size_t packetSize)
689
688
{
690
 
   TRACE_CALL();
 
689
   Debug("%s: entering.\n", __FUNCTION__);
691
690
   mUtil.OnRecvPacket(srcId, packet, packetSize);
692
691
}