VirtualBox

Changeset 47213 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jul 17, 2013 12:36:02 PM (11 years ago)
Author:
vboxsync
Message:

VBoxTray/IPC: Update, now supports retrieving last user input from current session (untested).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTrayMsg.h

    r34382 r47213  
    55
    66/*
    7  * Copyright (C) 2010 Oracle Corporation
     7 * Copyright (C) 2010-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1919#define ___VBOXTRAY_MSG_H
    2020
    21 #define VBOXTRAY_PIPE_IPC               "\\\\.\\pipe\\VBoxTrayIPC"
    22 #define VBOXTRAY_PIPE_IPC_BUFSIZE       64 * 1024
     21#define VBOXTRAY_IPC_PIPENAME           "VBoxTrayIPCSvc"
    2322
    2423enum VBOXTRAYIPCMSGTYPE
     
    2625    /** Restarts VBoxTray. */
    2726    VBOXTRAYIPCMSGTYPE_RESTART        = 10,
    28 
    29     /** Asks the IPC thread to quit. */
    30     VBOXTRAYIPCMSGTYPE_IPC_QUIT       = 50,
    31 
    3227    /** Shows a balloon message in the tray area. */
    33     VBOXTRAYIPCMSGTYPE_SHOWBALLOONMSG = 100
     28    VBOXTRAYIPCMSGTYPE_SHOWBALLOONMSG = 100,
     29    /** Retrieves the current user's last input
     30     *  time. This will be the user VBoxTray is running
     31     *  under. */
     32    VBOXTRAYIPCMSGTYPE_USERLASTINPUT  = 120
    3433};
    3534
    3635/* VBoxTray's IPC header. */
    37 typedef struct _VBOXTRAYIPCHEADER
     36typedef struct VBOXTRAYIPCHEADER
    3837{
    39     /** Message type. */
    40     ULONG ulMsg;
    41     /** Size of message body
    42      *  (without this header). */
    43     ULONG cbBody;
    44     /** User-supplied wParam. */
    45     ULONG wParam;
    46     /** User-supplied lParam. */
    47     ULONG lParam;
     38    /** Header version, must be 0 by now. */
     39    uint32_t uHdrVersion;
     40    /** Message type. Specifies a message
     41     *  of VBOXTRAYIPCMSGTYPE. */
     42    uint32_t uMsgType;
     43    /** Message length (in bytes). This must
     44     *  include the overall message length, including
     45     *  (eventual) dynamically allocated areas which
     46     *  are passed into the message structure.
     47     */
     48    uint32_t uMsgLen;
     49
    4850} VBOXTRAYIPCHEADER, *PVBOXTRAYIPCHEADER;
    4951
    50 typedef struct _VBOXTRAYIPCMSG_SHOWBALLOONMSG
     52/**
     53 * Tells VBoxTray to show a balloon message in Windows'
     54 * tray area. This may or may not work depending on the
     55 * system's configuration / set user preference.
     56 */
     57typedef struct VBOXTRAYIPCMSG_SHOWBALLOONMSG
    5158{
    52     /** Message content. */
    53     TCHAR    szContent[256];
    54     /** Message title. */
    55     TCHAR    szTitle[64];
     59    /** Length of message body (in bytes). */
     60    uint32_t cbMsgContent;
     61    /** Length of message title (in bytes). */
     62    uint32_t cbMsgTitle;
    5663    /** Message type. */
    57     ULONG    ulType;
    58     /** Flags; not used yet. */
    59     ULONG    ulFlags;
    60     /** Time to show the message (in msec). */
    61     ULONG    ulShowMS;
     64    uint32_t uType;
     65    /** Time to show the message (in ms). */
     66    uint32_t uShowMS;
     67    /** Dynamically allocated stuff.
     68     *
     69     *  Note: These must come at the end of the
     70     *  structure to not overwrite any important
     71     *  stuff above.
     72     */
     73    /** Message body. Can be up to 256 chars
     74     *  long. */
     75    char     szMsgContent[1];
     76        /** Message title. Can be up to 73 chars
     77     *  long. */
     78    char     szMsgTitle[1];
    6279} VBOXTRAYIPCMSG_SHOWBALLOONMSG, *PVBOXTRAYIPCMSG_SHOWBALLOONMSG;
     80
     81/**
     82 * Response telling the last input of the current user.
     83 */
     84typedef struct VBOXTRAYIPCRES_USERLASTINPUT
     85{
     86    uint32_t uTickCount;
     87} VBOXTRAYIPCRES_USERLASTINPUT, *PVBOXTRAYIPCRES_USERLASTINPUT;
    6388
    6489#endif /* !___VBOXTRAY_MSG_H */
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