gmyth/src/libgmyth/gmyth_remote_encoder.h
author leo_sobral
Thu Sep 21 00:33:03 2006 +0100 (2006-09-21)
branchtrunk
changeset 6 051875c9e136
parent 1 ffdf467315ec
permissions -rw-r--r--
[svn r7] Corrected glib macros G_BEGIN_DECLS, G_END_DECLS usage (andrunko's patch)
     1 /**
     2  * GMyth Library
     3  *
     4  * @file gmyth/gmyth_remote_encoder.h
     5  * 
     6  * @brief <p> GMythRemoteEncoder class defines functions for playing live tv.
     7  *
     8  * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
     9  * @author Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
    10  *
    11  *//*
    12  * 
    13  * This program is free software; you can redistribute it and/or modify
    14  * it under the terms of the GNU Lesser General Public License as published by
    15  * the Free Software Foundation; either version 2 of the License, or
    16  * (at your option) any later version.
    17  *
    18  * This program is distributed in the hope that it will be useful,
    19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    21  * GNU General Public License for more details.
    22  *
    23  * You should have received a copy of the GNU Lesser General Public License
    24  * along with this program; if not, write to the Free Software
    25  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    26  */
    27 
    28 #ifndef __GMYTH_REMOTE_ENCODER_H__
    29 #define __GMYTH_REMOTE_ENCODER_H__
    30 
    31 #include <glib-object.h>
    32 
    33 #include "gmyth_socket.h"
    34 
    35 #include <stdio.h>
    36 #include <stdlib.h>
    37 #include <string.h>
    38 #include <netdb.h>
    39 #include <sys/socket.h>
    40 #include <unistd.h>
    41 
    42 G_BEGIN_DECLS
    43 
    44 #define GMYTH_REMOTE_ENCODER_TYPE               (gmyth_remote_encoder_get_type ())
    45 #define GMYTH_REMOTE_ENCODER(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_REMOTE_ENCODER_TYPE, GMythRemoteEncoder))
    46 #define GMYTH_REMOTE_ENCODER_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_REMOTE_ENCODER_TYPE, GMythRemoteEncoderClass))
    47 #define IS_GMYTH_REMOTE_ENCODER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_REMOTE_ENCODER_TYPE))
    48 #define IS_GMYTH_REMOTE_ENCODER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_REMOTE_ENCODER_TYPE))
    49 #define GMYTH_REMOTE_ENCODER_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_REMOTE_ENCODER_TYPE, GMythRemoteEncoderClass))
    50 
    51 
    52 typedef struct _GMythRemoteEncoder         GMythRemoteEncoder;
    53 typedef struct _GMythRemoteEncoderClass    GMythRemoteEncoderClass;
    54 
    55 struct _GMythRemoteEncoderClass
    56 {
    57   GObjectClass parent_class;
    58 
    59   /* callbacks */
    60   /* no one for now */
    61 };
    62 
    63 struct _GMythRemoteEncoder
    64 {
    65     GObject parent;
    66 
    67     /* socket descriptor */
    68     GMythSocket *myth_socket;
    69     
    70     int recorder_num;
    71     GString *hostname;
    72     int port;
    73 };
    74 
    75 
    76 GType   gmyth_remote_encoder_get_type   (void);
    77 
    78 GMythRemoteEncoder* gmyth_remote_encoder_new    (int num,
    79                                                  GString *hostname,
    80                                                  gshort port);
    81 
    82 gboolean gmyth_remote_encoder_setup     (GMythRemoteEncoder *encoder);
    83 gboolean gmyth_remote_encoder_spawntv   (GMythRemoteEncoder *remote_encoder,
    84                                          GString *tvchain_id);
    85 gboolean gmyth_remote_encoder_stop_livetv (GMythRemoteEncoder *remote_encoder);
    86 
    87 G_END_DECLS
    88 
    89 #endif /* __GMYTH_REMOTE_ENCODER_H__ */