isolationserver/isoserver/inc/isoavtar.h
changeset 10 59927b2d3b75
parent 0 d0f3a028347a
equal deleted inserted replaced
0:d0f3a028347a 10:59927b2d3b75
     1 /*
       
     2 * ============================================================================
       
     3 *  Name        : isoconnectionmanager.h
       
     4 *  Part of     : isolation server.
       
     5 *  Version     : %version: 5 %
       
     6 *
       
     7 *  Copyright © 2007-2008 Nokia.  All rights reserved.
       
     8 *  All rights reserved.
       
     9 *  Redistribution and use in source and binary forms, with or without modification, 
       
    10 *  are permitted provided that the following conditions are met:
       
    11 *  Redistributions of source code must retain the above copyright notice, this list 
       
    12 *  of conditions and the following disclaimer.Redistributions in binary form must 
       
    13 *  reproduce the above copyright notice, this list of conditions and the following 
       
    14 *  disclaimer in the documentation and/or other materials provided with the distribution.
       
    15 *  Neither the name of the Nokia Corporation nor the names of its contributors may be used 
       
    16 *  to endorse or promote products derived from this software without specific prior written 
       
    17 *  permission.
       
    18 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
       
    19 *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
       
    20 *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
       
    21 *  SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
       
    22 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
       
    23 *  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
       
    24 *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
       
    25 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
       
    26 *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    27 * ============================================================================
       
    28 * Template version: 1.0
       
    29 */
       
    30 
       
    31 
       
    32 /*!
       
    33 * \def To avoid multiple inclusion of header
       
    34 */
       
    35 
       
    36 #ifndef __ISOAVTAR_H__
       
    37 #define __ISOAVTAR_H__
       
    38 
       
    39 #include <glib.h>
       
    40 #include <gtypes.h>
       
    41 
       
    42 #include "isoservermain.h"
       
    43 #include "msg_enums.h"
       
    44 
       
    45 #include "tp-conn.h"
       
    46 #include "tp-connmgr.h"
       
    47 #include "tp-props-iface.h"
       
    48 #include "tp-conn-iface-avatars-gen.h"
       
    49 #include "tp-interfaces.h"
       
    50 G_BEGIN_DECLS
       
    51 
       
    52 /*! \file
       
    53 *	This file has interfaces for avtar implimentation. 
       
    54 *	client anywhere in the documentation refers to anyone
       
    55 *	using the isoserver
       
    56 */
       
    57 
       
    58 
       
    59 /*!	\brief callback for updating own avtar. This function 
       
    60  *	sends response to client
       
    61  *
       
    62  * 	\param proxy : unused
       
    63  *  \param avatar_sha1: token string 
       
    64  * 	\param error : error if any
       
    65  * 	\param message : message header  
       
    66  * 	\return : void
       
    67  */
       
    68 void  update_avtar_cb(DBusGProxy *proxy, char* avatar_sha1,
       
    69 			GError* error, 
       
    70 			gpointer message);
       
    71 
       
    72 
       
    73 /*!	\brief sends avtar of the client to n/w server thru' gabble
       
    74  * 	calls tp_conn_iface_avatars_set_avatar_async to set avatar
       
    75  *  
       
    76  *  \param avtarcontent : avatar image content
       
    77  *  \param mimetype : mime type
       
    78  * 	\param msghdr request header that will be passed back to client
       
    79  *
       
    80  * 	\return : error code on failure, 0 on success
       
    81  */
       
    82 gint send_avtar( GArray* avtarcontent , char * mimetype , message_hdr_req *msg_hdr );
       
    83 
       
    84 /*!	\brief callback for clearing own avtar. This function 
       
    85  *	sends response to client
       
    86  *
       
    87  * 	\param proxy : unused
       
    88  * 	\param error : error if any
       
    89  * 	\param userdata : message header  
       
    90  * 	\return : void
       
    91  */
       
    92 void clear_avtar_cb( DBusGProxy *proxy, GError* error, gpointer userdata );
       
    93 
       
    94 /*! \brief clears the self avtar 
       
    95  *
       
    96  *  \param msghdr request header that will be passed back to client
       
    97  *
       
    98  *  \return : error code on failure, 0 on success
       
    99  */
       
   100 gint clear_avatar( message_hdr_req *msg_hdr );
       
   101 
       
   102 /*! \brief clears the self avtar 
       
   103  *  \param rmsg : message buffer to be parsed
       
   104  *  \param msg_struct : request header 
       
   105  *  \param result : message buffer length
       
   106  *  \param avtarcontent : pointer to the avatar image data
       
   107  * 
       
   108  *  \return : error code on failure, 0 on success
       
   109  */
       
   110 gint update_own_avatar(char* rmsg,message_hdr_resp* msg_struct,gint result, GArray** avtarcontent);
       
   111 
       
   112 G_END_DECLS
       
   113 
       
   114 
       
   115 #endif //__ISOAVTAR_H__