VirtualBox

Ignore:
Timestamp:
Nov 16, 2018 12:03:41 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126655
Message:

HGCM,Main,SharedFolder,SharedClipboard,GuestProperties: Added HGCM service helpers for statistics and dbg info registration/deregistration. A PUVM is passed to HGCMService (where the helpers are implemented) when the service is loaded. Since this drags in both dbg.h and stam.h, LOG_GROUP defines now have to be at the top of the include list as everywhere else (i.e. hgcmsvc.h will define LOG_GROUP default by dragging in log.h). Added generic statistics of HGCM message processing and function level statistics to the shared folder service. [missing files, ++]

Location:
trunk/src/VBox/HostServices/SharedClipboard
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp

    r69500 r75498  
     1/* $Id$ */
    12/** @file
    2  * Shared Clipboard: Win32 host.
     3 * Shared Clipboard Service - Win32 host.
    34 */
    45
     
    1516 */
    1617
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    1723#include <iprt/win/windows.h>
    1824
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h

    r69500 r75498  
     1/* $Id$ */
    12/** @file
    2  *
    3  * Shared Clipboard
     3 * Shared Clipboard Service - Internal Header.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef __VBOXCLIPBOARD__H
    19 #define __VBOXCLIPBOARD__H
     18#ifndef ___VBOXCLIPBOARD_H
     19#define ___VBOXCLIPBOARD_H
    2020
    21 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    2221#include <VBox/hgcmsvc.h>
    2322#include <VBox/log.h>
     
    9897#endif
    9998
    100 #endif /* __VBOXCLIPBOARD__H */
     99#endif /* !___VBOXCLIPBOARD_H */
     100
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc

    r69500 r75498  
    11/* $Id$ */
    22/** @file
    3  * VBoxSharedClipboard - Resource file containing version info and icon.
     3 * Shared Clipboard Service - Resource file containing version info and icon.
    44 */
    55
  • trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp

    r69500 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard: Mac OS X host implementation.
     3 * Shared Clipboard Service - Mac OS X host implementation.
    44 */
    55
     
    1818 */
    1919
    20 #define LOG_GROUP LOG_GROUP_HGCM
     20/*********************************************************************************************************************************
     21*   Header Files                                                                                                                 *
     22*********************************************************************************************************************************/
     23#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    2124#include <Carbon/Carbon.h>
    2225
     
    2932#include "VBox/GuestHost/clipboard-helper.h"
    3033
     34
     35/*********************************************************************************************************************************
     36*   Defined Constants And Macros                                                                                                 *
     37*********************************************************************************************************************************/
    3138/* For debugging */
    3239//#define SHOW_CLIPBOARD_CONTENT
     40
    3341
    3442/**
  • trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h

    r69500 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard: Mac OS X host implementation.
     3 * Shared Clipboard Service - Mac OS X host implementation.
    44 */
    55
     
    2121typedef struct OpaquePasteboardRef *PasteboardRef;
    2222
    23 int initPasteboard (PasteboardRef *pPasteboardRef);
    24 void destroyPasteboard (PasteboardRef *pPasteboardRef);
     23int initPasteboard(PasteboardRef *pPasteboardRef);
     24void destroyPasteboard(PasteboardRef *pPasteboardRef);
    2525
    26 int queryNewPasteboardFormats (PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged);
    27 int readFromPasteboard (PasteboardRef pPasteboard, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcbActual);
    28 int writeToPasteboard (PasteboardRef pPasteboard, void *pv, uint32_t cb, uint32_t fFormat);
     26int queryNewPasteboardFormats(PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged);
     27int readFromPasteboard(PasteboardRef pPasteboard, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcbActual);
     28int writeToPasteboard(PasteboardRef pPasteboard, void *pv, uint32_t cb, uint32_t fFormat);
    2929
    3030#endif
  • trunk/src/VBox/HostServices/SharedClipboard/darwin.cpp

    r69500 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard: Mac OS X host.
     3 * Shared Clipboard Service - Mac OS X host.
    44 */
    55
     
    1616 */
    1717
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    1823#include <VBox/HostServices/VBoxClipboardSvc.h>
    1924
     
    2530#include "darwin-pasteboard.h"
    2631
     32
     33/*********************************************************************************************************************************
     34*   Structures and Typedefs                                                                                                      *
     35*********************************************************************************************************************************/
    2736/** Global clipboard context information */
    2837struct _VBOXCLIPBOARDCONTEXT
     
    3847};
    3948
     49
     50/*********************************************************************************************************************************
     51*   Global Variables                                                                                                             *
     52*********************************************************************************************************************************/
    4053/** Only one client is supported. There seems to be no need for more clients. */
    4154static VBOXCLIPBOARDCONTEXT g_ctx;
  • trunk/src/VBox/HostServices/SharedClipboard/service.cpp

    r73097 r75498  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard: Host service entry points.
     3 * Shared Clipboard Service - Host service entry points.
    44 */
    55
     
    7070 */
    7171
     72/*********************************************************************************************************************************
     73*   Header Files                                                                                                                 *
     74*********************************************************************************************************************************/
     75#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    7276#include <VBox/HostServices/VBoxClipboardSvc.h>
    7377#include <VBox/HostServices/VBoxClipboardExt.h>
     
    8185#include "VBoxClipboard.h"
    8286
    83 static void VBoxHGCMParmUInt32Set (VBOXHGCMSVCPARM *pParm, uint32_t u32)
    84 {
    85     pParm->type = VBOX_HGCM_SVC_PARM_32BIT;
    86     pParm->u.uint32 = u32;
    87 }
    88 
    89 static int VBoxHGCMParmUInt32Get (VBOXHGCMSVCPARM *pParm, uint32_t *pu32)
    90 {
    91     if (pParm->type == VBOX_HGCM_SVC_PARM_32BIT)
    92     {
    93         *pu32 = pParm->u.uint32;
    94         return VINF_SUCCESS;
    95     }
    96 
    97     return VERR_INVALID_PARAMETER;
    98 }
    99 
    100 #if 0
    101 static void VBoxHGCMParmPtrSet (VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb)
    102 {
    103     pParm->type             = VBOX_HGCM_SVC_PARM_PTR;
    104     pParm->u.pointer.size   = cb;
    105     pParm->u.pointer.addr   = pv;
    106 }
    107 #endif
    108 
    109 static int VBoxHGCMParmPtrGet (VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb)
    110 {
    111     if (pParm->type == VBOX_HGCM_SVC_PARM_PTR)
    112     {
    113         *ppv = pParm->u.pointer.addr;
    114         *pcb = pParm->u.pointer.size;
    115         return VINF_SUCCESS;
    116     }
    117 
    118     return VERR_INVALID_PARAMETER;
    119 }
    120 
     87
     88/*********************************************************************************************************************************
     89*   Global Variables                                                                                                             *
     90*********************************************************************************************************************************/
    12191static PVBOXHGCMSVCHELPERS g_pHelpers;
    12292
     
    136106/** Is the clipboard running in headless mode? */
    137107static bool g_fHeadless = false;
     108
     109
     110static void VBoxHGCMParmUInt32Set (VBOXHGCMSVCPARM *pParm, uint32_t u32)
     111{
     112    pParm->type = VBOX_HGCM_SVC_PARM_32BIT;
     113    pParm->u.uint32 = u32;
     114}
     115
     116static int VBoxHGCMParmUInt32Get (VBOXHGCMSVCPARM *pParm, uint32_t *pu32)
     117{
     118    if (pParm->type == VBOX_HGCM_SVC_PARM_32BIT)
     119    {
     120        *pu32 = pParm->u.uint32;
     121        return VINF_SUCCESS;
     122    }
     123
     124    return VERR_INVALID_PARAMETER;
     125}
     126
     127#if 0
     128static void VBoxHGCMParmPtrSet (VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb)
     129{
     130    pParm->type             = VBOX_HGCM_SVC_PARM_PTR;
     131    pParm->u.pointer.size   = cb;
     132    pParm->u.pointer.addr   = pv;
     133}
     134#endif
     135
     136static int VBoxHGCMParmPtrGet (VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb)
     137{
     138    if (pParm->type == VBOX_HGCM_SVC_PARM_PTR)
     139    {
     140        *ppv = pParm->u.pointer.addr;
     141        *pcb = pParm->u.pointer.size;
     142        return VINF_SUCCESS;
     143    }
     144
     145    return VERR_INVALID_PARAMETER;
     146}
     147
    138148
    139149static uint32_t vboxSvcClipboardMode (void)
  • trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp

    r69656 r75498  
     1/* $Id$ */
    12/** @file
    2  *
    3  * Shared Clipboard:
    4  * Linux host.
     3 * Shared Clipboard Service - Linux host.
    54 */
    65
     
    1716 */
    1817
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
    1922#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    20 
    21 #include <string.h>
    22 
    2323#include <iprt/assert.h>
    2424#include <iprt/critsect.h>
     
    2626#include <iprt/mem.h>
    2727#include <iprt/semaphore.h>
     28#include <iprt/string.h>
    2829
    2930#include <VBox/GuestHost/SharedClipboard.h>
  • trunk/src/VBox/HostServices/SharedClipboard/x11-stub.cpp

    r70243 r75498  
     1/* $Id$*/
    12/** @file
    2  *
    3  * Shared Clipboard:
    4  * Linux host, a stub version with no functionality for use on headless hosts.
     3 * Shared Clipboard Service - Linux host, a stub version with no functionality for use on headless hosts.
    54 */
    65
     
    1716 */
    1817
     18
     19/*********************************************************************************************************************************
     20*   Header Files                                                                                                                 *
     21*********************************************************************************************************************************/
     22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
    1923#include <VBox/HostServices/VBoxClipboardSvc.h>
    2024
     
    3236
    3337#include "VBoxClipboard.h"
     38
     39
    3440
    3541/** Initialise the host side of the shared clipboard - called by the hgcm layer. */
     
    129135    LogFlowFunc(("called, returning.\n"));
    130136}
     137
Note: See TracChangeset for help on using the changeset viewer.

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