cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

clipboard.h (2456B)


      1/*
      2 * Licensed to the Apache Software Foundation (ASF) under one
      3 * or more contributor license agreements.  See the NOTICE file
      4 * distributed with this work for additional information
      5 * regarding copyright ownership.  The ASF licenses this file
      6 * to you under the Apache License, Version 2.0 (the
      7 * "License"); you may not use this file except in compliance
      8 * with the License.  You may obtain a copy of the License at
      9 *
     10 *   http://www.apache.org/licenses/LICENSE-2.0
     11 *
     12 * Unless required by applicable law or agreed to in writing,
     13 * software distributed under the License is distributed on an
     14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     15 * KIND, either express or implied.  See the License for the
     16 * specific language governing permissions and limitations
     17 * under the License.
     18 */
     19
     20#ifndef _GUAC_VNC_CLIPBOARD_H
     21#define _GUAC_VNC_CLIPBOARD_H
     22
     23#include "config.h"
     24
     25#include <guacamole/client.h>
     26#include <guacamole/user.h>
     27#include <rfb/rfbclient.h>
     28
     29/**
     30 * Sets the encoding of clipboard data exchanged with the VNC server to the
     31 * encoding having the given name. If the name is NULL, or is invalid, the
     32 * standard ISO8859-1 encoding will be used.
     33 *
     34 * @param client
     35 *     The client to set the clipboard encoding of.
     36 *
     37 * @param name
     38 *     The name of the encoding to use for all clipboard data. Valid values
     39 *     are: "ISO8859-1", "UTF-8", "UTF-16", "CP1252", or NULL.
     40 *
     41 * @return
     42 *     Zero if the chosen encoding is standard for VNC, or non-zero if the VNC
     43 *     standard is being violated.
     44 */
     45int guac_vnc_set_clipboard_encoding(guac_client* client,
     46        const char* name);
     47
     48/**
     49 * Handler for inbound clipboard data from Guacamole users.
     50 */
     51guac_user_clipboard_handler guac_vnc_clipboard_handler;
     52
     53/**
     54 * Handler for stream data related to clipboard.
     55 */
     56guac_user_blob_handler guac_vnc_clipboard_blob_handler;
     57
     58/**
     59 * Handler for end-of-stream related to clipboard.
     60 */
     61guac_user_end_handler guac_vnc_clipboard_end_handler;
     62
     63/**
     64 * Handler for clipboard data received via VNC, invoked by libVNCServer
     65 * whenever text has been copied or cut within the VNC session.
     66 *
     67 * @param client
     68 *     The VNC client associated with the session in which the user cut or
     69 *     copied text.
     70 *
     71 * @param text
     72 *     The string of cut/copied text.
     73 *
     74 * @param textlen
     75 *     The number of bytes in the string of cut/copied text.
     76 */
     77void guac_vnc_cut_text(rfbClient* client, const char* text, int textlen);
     78
     79#endif
     80