libtelepathy/src/libtelepathy_wsd.cpp
changeset 0 d0f3a028347a
equal deleted inserted replaced
-1:000000000000 0:d0f3a028347a
       
     1 /* 
       
     2  *
       
     3  * Copyright (C) 2008 Nokia Corporation.
       
     4  * This library is free software; you can redistribute it and/or
       
     5  * modify it under the terms of the GNU Lesser General Public
       
     6  * License as published by the Free Software Foundation; either
       
     7  * version 2.1 of the License, or (at your option) any later version.
       
     8  *
       
     9  * This library is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
       
    12  * Lesser General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU Lesser General Public
       
    15  * License along with this library; if not, write to the Free Software
       
    16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
       
    17  *
       
    18  */
       
    19 #include <e32std.h> 
       
    20 #include "libtelepathy_wsd_solution.h"
       
    21 #include <pls.h> // For emulator WSD API 
       
    22 
       
    23 const TUid KLibTelUid3 = {0x2000F850};     // This is the UID of the library
       
    24 
       
    25 struct libtelepathy_global_struct* libtelepathy_ImpurePtr()
       
    26 {
       
    27 	  #if defined(__WINSCW__) || defined(__WINS__)
       
    28 
       
    29 	// Access the PLS of this process
       
    30 	struct libtelepathy_global_struct *g = Pls<struct libtelepathy_global_struct>(KLibTelUid3, &libtelepathy_Init);	
       
    31     return g;
       
    32 
       
    33 	#else
       
    34 
       
    35 	return NULL;	
       
    36 
       
    37 	#endif
       
    38 
       
    39 }
       
    40 
       
    41 int libtelepathy_Init(libtelepathy_global_struct *g)
       
    42 {
       
    43 	  if(g)
       
    44 	  {  	
       
    45 	  		
       
    46 	  	  g->GET_WSD_VAR_NAME(parent_class,tp_chan,s) = NULL;
       
    47 	  	  g->GET_WSD_VAR_NAME(type1,tp_chan,s) = 0;
       
    48 	  	  g->GET_WSD_VAR_NAME(ret1,tp_chan,s) = 0;
       
    49 	  	  g->GET_WSD_VAR_NAME(ret2,tp_chan,s) = 0;
       
    50 	  	  g->GET_WSD_VAR_NAME(ret3,tp_chan,s) = 0;
       
    51 	  	  g->GET_WSD_VAR_NAME(ret4,tp_chan,s) = 0;
       
    52 	  	  g->GET_WSD_VAR_NAME(ret5,tp_chan,s) = 0;
       
    53 	  	  g->GET_WSD_VAR_NAME(ret6,tp_chan,s) = 0;
       
    54 	  	  g->GET_WSD_VAR_NAME(ret7,tp_chan,s) = 0;
       
    55 	  	  g->GET_WSD_VAR_NAME(ret8,tp_chan,s) = 0;
       
    56 	  	  g->GET_WSD_VAR_NAME(ret9,tp_chan,s) = 0;
       
    57 	  	  g->GET_WSD_VAR_NAME(ret10,tp_chan,s) = 0;
       
    58 	  	  g->GET_WSD_VAR_NAME(ret11,tp_chan,s) = 0;
       
    59 	  	  
       
    60 	  	  g->GET_WSD_VAR_NAME(parent_class,tp_conn,s) = NULL;
       
    61 	  	  g->GET_WSD_VAR_NAME(type1,tp_conn,s) = 0;
       
    62 	  	  g->GET_WSD_VAR_NAME(ret1,tp_conn,s) = 0;
       
    63 	  	  g->GET_WSD_VAR_NAME(ret2,tp_conn,s) = 0;
       
    64 	  	  g->GET_WSD_VAR_NAME(ret3,tp_conn,s) = 0;
       
    65 	  	  g->GET_WSD_VAR_NAME(ret4,tp_conn,s) = 0;
       
    66 	  	  g->GET_WSD_VAR_NAME(ret5,tp_conn,s) = 0;
       
    67 	  	  g->GET_WSD_VAR_NAME(ret6,tp_conn,s) = 0;
       
    68 	  	  g->GET_WSD_VAR_NAME(ret7,tp_conn,s) = 0;
       
    69 	  	  g->GET_WSD_VAR_NAME(ret8,tp_conn,s) = 0;	  	  
       
    70 	  	  
       
    71 	  	  g->GET_WSD_VAR_NAME(parent_class,tp_connmgr,s) = NULL;
       
    72 	  	  g->GET_WSD_VAR_NAME(type1,tp_connmgr,s) = 0;
       
    73 	  	  
       
    74 	  	  g->GET_WSD_VAR_NAME(bus_proxy,tp_helpers,s) = NULL;
       
    75 	  	  g->GET_WSD_VAR_NAME(bus1,tp_helpers,s) = NULL;
       
    76 	  	  
       
    77 	  	  
       
    78 	  	  g->GET_WSD_VAR_NAME(parent_class,tp_props_iface,s) = NULL;
       
    79 	  	  g->GET_WSD_VAR_NAME(type1,tp_props_iface,s) = 0;
       
    80 	  	  g->GET_WSD_VAR_NAME(ret,tp_props_iface,s) = 0;
       
    81 	  	  
       
    82 	  	  memset(&(g->GET_WSD_VAR_NAME(signals,tp_props_iface,s)),0,LAST_SIGNAL_TP_PROPS_IFACE*sizeof(guint));	  
       
    83 	  	  
       
    84 			return 0;	
       
    85 	  }
       
    86 	  return 1;
       
    87 }
       
    88