Main Page   Compound List   File List   Compound Members   File Members  

konspire2b.h

Go to the documentation of this file.
00001 /*
00002  * Modification History
00003  *
00004  * 2002-July-9   Jason Rohrer
00005  * Created.
00006  *
00007  * 2002-July-10   Jason Rohrer
00008  * Added functions for startup, shutdown, and log configuration.
00009  *
00010  * 2002-July-18   Jason Rohrer
00011  * Changed all names to avoid conflicts (using OpenGL api as a model).
00012  * Fixed a macro definition bug. 
00013  *
00014  * 2002-July-25   Jason Rohrer
00015  * Removed external dependency on messages/Broadcast.h from
00016  * k2bGetPendingBroadcastStatus().
00017  *
00018  * 2002-July-31   Jason Rohrer
00019  * Removed all external dependencies.
00020  * Added a content type to broadcast initiation functions.
00021  * Added support for transfer speeds.
00022  *
00023  * 2002-August-2   Jason Rohrer
00024  * Added a function for canceling a pending broadcast receipt.
00025  *
00026  * 2002-August-5   Jason Rohrer
00027  * Fixed errors in documentation.
00028  *
00029  * 2002-August-6    Jason Rohrer
00030  * Added a wanted flag to prebroadcasts.
00031  *
00032  * 2002-August-13    Jason Rohrer
00033  * Changed to create received directories for subscribed channels.
00034  *
00035  * 2002-September-8    Jason Rohrer
00036  * Added support for a user-specified local address.
00037  *
00038  * 2002-September-15    Jason Rohrer
00039  * Added support for a user-specified local address.
00040  *
00041  * 2002-September-16    Jason Rohrer
00042  * Added support for prebroadcast forward probabilities and fuzzy horizons.
00043  *
00044  * 2002-September-25    Jason Rohrer
00045  * Removed local address parameter from startup function.
00046  * Added functions for getting/setting the local address.
00047  * Added a function for getting the origin of the local address.
00048  *
00049  * 2002-September-26    Jason Rohrer
00050  * Added support for prebroadcast time to live values.
00051  *
00052  * 2002-September-27    Jason Rohrer
00053  * Added more time to live functions.
00054  * Removed all fuzzy horizon support.
00055  *
00056  * 2002-October-3    Jason Rohrer
00057  * Added support for sending broadcast series.
00058  *
00059  * 2002-October-14    Jason Rohrer
00060  * Added support for setting number of connections to maintain.
00061  *
00062  * 2002-October-29    Jason Rohrer
00063  * Changed comments to work better with doxygen.
00064  */
00065 
00066 
00067 
00068 #ifndef KONSPIRE_2B_API_INCLUDED
00069 #define KONSPIRE_2B_API_INCLUDED
00070 
00071 
00072 
00073 #include <stdio.h>
00074 
00075 
00076 
00077 /**
00078  * @file konspire2b.h
00079  *
00080  * The API (Application Programming Interface) for interfacing with
00081  * the functionality of the konspire2b reference implementation.
00082  *
00083  * This API is essentially a collection of functions for controling
00084  * the behavior of a konspire2b-compliant node.
00085  *
00086  * All parameters of type (char *) must be \0-terminated strings.
00087  * Such parameters must be destroyed by the function caller if non-const:
00088  * the parameters are copied internally by the callee.
00089  *
00090  * @author Jason Rohrer
00091  */
00092 
00093 
00094 
00095 /**
00096  * Constructs and starts the konspire2b reference implementation system.
00097  *
00098  * Must be called before calling any other API calls.
00099  *
00100  * @param inPort the port the local konspire2b node will listen on
00101  *   for connections.
00102  */
00103 void k2bStartup( int inPort );
00104 
00105 
00106 
00107 /**
00108  * Halts the konspire2b reference implementation system.
00109  *
00110  * Should be called before exiting the program to avoid memory leaks.
00111  */
00112 void k2bShutdown();
00113 
00114 
00115 
00116 #define K2B_DEACTIVATE_LEVEL     0
00117 #define K2B_CRITICAL_ERROR_LEVEL 1
00118 #define K2B_ERROR_LEVEL          2
00119 #define K2B_WARNING_LEVEL        3
00120 #define K2B_INFO_LEVEL           4
00121 #define K2B_DETAIL_LEVEL         5
00122 #define K2B_TRACE_LEVEL          6
00123 
00124 /**
00125  * Sets the logging level used by the reference implementation.
00126  *
00127  * @param inLoggingLevel the logging level to use.  One of:
00128  *   K2B_DEACTIVATE_LEVEL
00129  *   K2B_CRITICAL_ERROR_LEVEL
00130  *   K2B_ERROR_LEVEL
00131  *   K2B_WARNING_LEVEL
00132  *   K2B_INFO_LEVEL
00133  *   K2B_DETAIL_LEVEL
00134  *   K2B_TRACE_LEVEL
00135  *   Values further down on this list show more detailed log messages.
00136  */
00137 void k2bSetLoggingLevel( int inLoggingLevel );
00138 
00139 
00140 
00141 /**
00142  * Sets the file to which log messages are written.
00143  *
00144  * Defaults to konspire2b.log in the current working directory.
00145  *
00146  * @param inLogFilePath path name to the log file.
00147  *
00148  * Example: <PRE>
00149  * k2bSetLogFile( "test.log" );
00150  * </PRE>
00151  */
00152 void k2bSetLogFile( char *inLogFilePath );
00153 
00154 
00155 
00156 /**
00157  * Gets whether the local network address of this node is provided by
00158  * the network system.
00159  *
00160  * @return true if the local address is provided by the network system,
00161  *   and false if the local address is provided by the user.
00162  */
00163 char k2bIsLocalAddressProvidedByNetwork();
00164 
00165 
00166 
00167 /**
00168  * Gets the local network address of this node. 
00169  */
00170 char *k2bGetLocalHostAddress();
00171 
00172 
00173 
00174 /**
00175  * Sets the time to live for new prebroadcasts sent by this node.
00176  *
00177  * @param inTimeToLive the starting time to live value.
00178  */
00179 void k2bSetTimeToLive( int inTimeToLive );
00180 
00181 
00182 
00183 /**
00184  * Gets the time to live for new prebroadcasts sent by this node.
00185  *
00186  * @return the starting time to live value.
00187  */
00188 int k2bGetTimeToLive();
00189 
00190 
00191 
00192 /**
00193  * Sets the cap for the time to live of forwarded prebroadcasts.
00194  *
00195  * @param inCap the limit value, or 0 to specify no cap.
00196  */
00197 void k2bSetTimeToLiveCap( int inCap );
00198 
00199 
00200 
00201 /**
00202  * Gets the cap for the time to live of forwarded prebroadcasts.
00203  *
00204  * @return the limit value, or 0 to indicate no cap.
00205  */
00206 int k2bGetTimeToLiveCap();
00207 
00208 
00209 
00210 /**
00211  * Sets the local network address of this node. 
00212  *
00213  * This parameter is useful for nodes operating behind firewalls with
00214  * tunnels for k2b traffic.  In such cases, the address of the firewall
00215  * must be specified so that other nodes outside the firewall can
00216  * innitiate connections to the firewall-protected node.
00217  *
00218  * @param inLocalHostAddress the address this node will send out as its
00219  *   local host address, or NULL to use the address obtainable from the
00220  *   system.
00221  */
00222 void k2bSetLocalHostAddress( char *inAddress );
00223 
00224 
00225 
00226 /**
00227  * Sets the number of connections maintained by this node.
00228  *
00229  * @param inTarget the target number of connections to maintain.
00230  */
00231 void k2bSetTargetNumberOfConnections( int inTarget );
00232 
00233 
00234 
00235 /**
00236  * Sets the number of connections this node is trying to maintain.
00237  *
00238  * @return the target number of connections being maintained..
00239  */
00240 int k2bGetTargetNumberOfConnections();
00241 
00242 
00243 
00244 /**
00245  * Adds a host to the local host list.
00246  *
00247  * @param inHostAddress the internet address of the host to add.
00248  * @param inHostPort the konspire2b port of the host to add.
00249  *
00250  * Examples: <PRE>
00251  * k2bAddHost( "k2b.myhost.com", 6089 );
00252  * k2bAddHost( "128.243.100.9", 6089 );
00253  * </PRE>
00254  */
00255 void k2bAddHost( char *inHostAddress, int inHostPort );
00256 
00257 
00258 
00259 
00260 /**
00261  * Gets a list of hosts that the local node is directly connected to.
00262  *
00263  * @param outHostAddresses pointer to location where an array of host address
00264  *   strings should be returned.  The array and the strings it contains
00265  *   must be destroyed by caller.
00266  * @param outHostPorts pointer to location where an array of host ports should
00267  *   be returned.  The array must be destroyed by caller.
00268  *
00269  * @return the number of hosts returned (in other words, the length of
00270  *   each returned array).
00271  *
00272  * Example: <PRE>
00273  * char **addresses;
00274  * int *ports;
00275  * int numHosts = k2bGetConnectedHostList( &addresses, &ports );
00276  * // process addresses here
00277  * ...
00278  * // now destroyed returned arrays
00279  * for( int i=0; i<numHosts; i++ ) {
00280  *     delete [] addresses[i];
00281  *     }
00282  * delete [] addresses;
00283  * delete [] ports;
00284  * </PRE>
00285  */
00286 int k2bGetConnectedHostList( char ***outHostAddresses, int **outHostPorts );
00287 
00288 
00289 
00290 /**
00291  * Subscribes to a channel and creates a received directory for the channel
00292  * if the directory does not exist.
00293  *
00294  * @param inChannelName the name of the channel to subscribe to.
00295  *
00296  * Example: <PRE>
00297  * k2bSubscribeToChannel( "testChannel" );
00298  * </PRE>
00299  */
00300 void k2bSubscribeToChannel( char *inChannelName );
00301 
00302 
00303 
00304 /**
00305  * Unsubscribes from a channel.
00306  *
00307  * @param inChannelName the name of the channel to unsubscribe from.
00308  *
00309  * Example: <PRE>
00310  * k2bUnsubscribeFromChannel( "testChannel" );
00311  * </PRE>
00312  */
00313 void k2bUnsubscribeFromChannel( char *inChannelName );
00314 
00315 
00316 
00317 /**
00318  * Gets a list of subscribed channels.
00319  *
00320  * @param outChannelNames pointer to location where array of channel name
00321  *   strings should be returned.  The array and the strings it contains
00322  *   must be destroyed by caller.
00323  *
00324  * @return the number of channel names returned (in other words, the length of
00325  *   the returned array).
00326  *
00327  * Example: <PRE>
00328  * char **channelNames;
00329  * int numChannels = k2bGetSubscriptionList( &channelNames );
00330  * // process channel names here
00331  * ...
00332  * // now destroyed returned array
00333  * for( int i=0; i<numChannels; i++ ) {
00334  *     delete [] channelNames[i];
00335  *     }
00336  * delete [] channelNames;
00337  * </PRE>
00338  */
00339 int k2bGetSubscriptionList( char ***outChannelNames );
00340 
00341 
00342 
00343 /**
00344  * Sends a broadcast.
00345  *
00346  * Note:
00347  * If a sender key exists for the specified channel, it will be used
00348  * to sign the broadcast.
00349  *
00350  * @param inChannelName the channel to send the broadcast on.
00351  * @param inBroadcastName the name of the broadcast (for example,
00352  *   the file name, if appropriate).
00353  * @param inBroadcastComment the comment for the broadcast.
00354  * @param inFilePath the platform-specific path string locating the
00355  *   file containing the contents for this broadcast.
00356  * @param inContentType the MIME type of the content, or NULL if the
00357  *   content has no type.
00358  *
00359  * Example: <PRE>
00360  * k2bInitiateBroadcast( "testChan",
00361  *                       "testBroadcast.txt",
00362  *                       "This is a test broadcast.",
00363  *                       "myFiles/testMessage.txt",
00364  *                       "text/plain"  );
00365  * </PRE>
00366  */
00367 void k2bInitiateBroadcast( char *inChannelName,
00368                            char *inBroadcastName,
00369                            char *inBroadcastComment,
00370                            char *inFilePath,
00371                            char *inContentType );
00372 
00373 
00374 
00375 /**
00376  * Sends a series of broadcasts out on the same channel, one by one.
00377  *
00378  * Note:
00379  * If a sender key exists for the specified channel, it will be used
00380  * to sign the broadcast.
00381  *
00382  * @param inChannelName the channel to send the broadcasts on.
00383  * @param inNumBroadcasts the number of broadcasts to send.
00384  * @param inBroadcastNames the name of each broadcast (for example,
00385  *   the file name, if appropriate).
00386  * @param inBroadcastComments the comment for each broadcast.
00387  * @param inFilePath the platform-specific path string locating the
00388  *   file containing the contents for each broadcast.
00389  * @param inContentType the MIME type of the content for each broadcast,
00390  *   or NULL if the content has no type.
00391  *
00392  * Example: <PRE>
00393  * int numBroadcasts = 2;
00394  *
00395  * char **names = new char*[ numBroadcasts ];
00396  * names[0] = "testFile1.txt";
00397  * names[2] = "testFile2.txt";
00398  *
00399  * char **comments = new char*[ numBroadcasts ];
00400  * comments[0] = "The first in this series.";
00401  * comments[2] = "The second in this series.";
00402  *
00403  * char **paths = new char*[ numBroadcasts ];
00404  * paths[0] = "myFiles/testMessage1.txt";
00405  * paths[2] = "myFiles/testMessage2.txt";
00406  *
00407  * char **types = new char*[ numBroadcasts ];
00408  * types[0] = "text/plain";
00409  * types[2] = "text/plain";
00410  * 
00411  *
00412  * k2bInitiateBroadcastSeries( "testChan",
00413  *                             numBroadcasts,
00414  *                             names,
00415  *                             comments,
00416  *                             paths,
00417  *                             types );
00418  * delete [] names;
00419  * delete [] comments;
00420  * delete [] paths;
00421  * delete [] types;
00422  * </PRE>
00423  */
00424 void k2bInitiateBroadcastSeries( char *inChannelName,
00425                                  int inNumBroadcasts,
00426                                  char **inBroadcastNames,
00427                                  char **inBroadcastComments,
00428                                  char **inFilePaths,
00429                                  char **inContentTypes );
00430 
00431 
00432 
00433 /**
00434  * Gets a list of caught prebroadcasts.
00435  *
00436  * Note that the reference implementation discards old caught Prebroadcasts,
00437  * so the returned list is bounded in sized.
00438  *
00439  * @param outChannelNames location where the channel names for the caught
00440  *   prebroadcasts should be returned.
00441  *   The array and the strings it contains must be destroyed by caller.
00442  * @param outBroadcastNames location where the broadcast names for the caught
00443  *   prebroadcasts should be returned.
00444  *   The array and the strings it contains must be destroyed by caller.
00445  * @param outComments location where the comments for the caught prebroadcasts
00446  *   should be returned.
00447  *   The array and the strings it contains must be destroyed by caller.
00448  * @param outContentTypes location where the content types for the caught
00449  *   prebroadcasts should be returned.
00450  *   The array and the strings it contains must be destroyed by caller.
00451  * @param outContentLengthsInBytes pointer to location where array of
00452  *   content lengths for each caught prebroadcast should be returned. 
00453  *   Must be destroyed by caller.
00454  * @param outWantedFlags pointer to location where array of wanted flags
00455  *   should be returned.  Each flag is true iff the corresponding
00456  *   prebroadcast was wanted by the current node (for example, if the
00457  *   node is subscribed to the channel, the prebroadcast has not yet
00458  *   been received, and the name signature passes).
00459  *   Must be destroyed by caller.
00460  *
00461  * @return the number of Prebroadcasts caught (in other words, the length of
00462  *   each of the returned arrays).
00463  *
00464  * Example: <PRE>
00465  * char **caughtChannelNames;
00466  * char **caughtBroadcastNames;
00467  * char **caughtComments;
00468  * char **caughtContentTypes;
00469  * unsigned long *caughtContentLengths;
00470  * char *caughtWantedFlags;
00471  *
00472  * int numCaught = k2bGetCaughtPrebroadcasts( &caughtChannelNames,
00473  *                                            &caughtBroadcastNames,
00474  *                                            &caughtComments,
00475  *                                            &caughtContentTypes,
00476  *                                            &caughtContentLengths );
00477  * // process caught Prebroadcasts here
00478  * ...
00479  * // now destroyed returned arrays
00480  * for( int i=0; i<numCaught; i++ ) {
00481  *     delete [] caughtChannelNames[i];
00482  *     delete [] caughtBroadcastNames[i];
00483  *     delete [] caughtComments[i];
00484  *     delete [] caughtContentTypes[i];
00485  *     }
00486  * delete [] caughtChannelNames;
00487  * delete [] caughtBroadcastNames;
00488  * delete [] caughtComments;
00489  * delete [] caughtContentTypes;
00490  * delete [] caughtContentLengths;
00491  * delete [] caughtWantedFlags;
00492  * </PRE>
00493  */
00494 int k2bGetCaughtPrebroadcasts( char ***outChannelNames,
00495                                char ***outBroadcastNames,
00496                                char ***outComments,
00497                                char ***outContentTypes,
00498                                unsigned long **outContentLengthsInBytes,
00499                                char **outWantedFlags );
00500 
00501 
00502 
00503 /**
00504  * Generates a sender key pair.
00505  *
00506  * The private portion of the key will be saved into the sender key folder
00507  * with the name "channelName.key".
00508  * The public portion of the key will be saved into the receiver key folder
00509  * with the name "channelName.key".
00510  *
00511  * @param inChannelName the name of the channel to generate a key for.
00512  * @param inRandomSeed the random seed string to use when generating the key.
00513  *   The key is only as secure as the random seed string.
00514  *   In general, the random seed should be provided by the user typing in
00515  *   a "random" or "garbled" character string.
00516  *
00517  * Example: <PRE>
00518  * k2bGenerateSenderKeyPair( "testChannel", "sdfj fjsdf u48932 fjk83mv9 df9" );
00519  * </PRE>
00520  */
00521 void k2bGenerateSenderKeyPair( char *inChannelName, char *inRandomSeed );
00522 
00523 
00524 
00525 /**
00526  * Adds a receiver key by downloading it from a URL.
00527  *
00528  * The public portion of the key will be saved into the receiver key folder
00529  * with the name "channelName.key".
00530  *
00531  * @param inChannelName the name of the channel to fetch a key for.
00532  * @param inKeyURL the URL of the key to download.
00533  *
00534  * @return true if fetching the key succeeds, and false if fetching fails.
00535  *
00536  * Example: <PRE>
00537  * char fetched = k2bFetchReceiverKey(
00538  *     "testChannel",
00539  *     "http://www.myserver.com/testChan.key" );
00540  * </PRE>
00541  */
00542 char k2bFetchReceiverKey( char *inChannelName, char *inKeyURL );
00543 
00544 
00545 
00546 /**
00547  * Note that the following two functions,
00548  * getSenderKeyFile() and getReceiverKeyFile(),
00549  * are provided to avoid external dependency on the location of the key
00550  * files (for example, in the sender_keys and receiver_keys folders).
00551  */
00552 
00553 
00554 
00555 /**
00556  * Gets the path to the sender (private) portion of a key for a channel,
00557  * if it exists.
00558  *
00559  * @param inChannelName the name of the channel to get a key for.
00560  *
00561  * @return a platform-specific path to the key file, or NULL if no sender
00562  *   key is present for this channel.
00563  *   Must be destroyed by caller if not NULL.
00564  *
00565  * Example: <PRE>
00566  * char *filePath = k2bGetSenderKeyFile( "testChan" );
00567  * if( filePath != NULL ) {
00568  *     // process file path here
00569  *     ...
00570  *     // destroy file path
00571  *     delete [] filePath;
00572  *     }
00573  * </PRE>
00574  */
00575 char *k2bGetSenderKeyFile( char *inChannelName );
00576 
00577 
00578 
00579 /**
00580  * Gets the path to the receiver (public) portion of a key for a channel,
00581  * if it exists.
00582  *
00583  * @param inChannelName the name of the channel to get a key for.
00584  *
00585  * @return a platform-specific path to the key file, or NULL if no receiver
00586  *   key is present for this channel.
00587  *   Must be destroyed by caller if not NULL.
00588  *
00589  * Example: <PRE>
00590  * char *filePath = k2bGetReceiverKeyFile( "testChan" );
00591  * if( filePath != NULL ) {
00592  *     // process file path here
00593  *     ...
00594  *     // destroy file path
00595  *     delete [] filePath;
00596  *     }
00597  * </PRE>
00598  */
00599 char *k2bGetReceiverKeyFile( char *inChannelName );
00600 
00601 
00602 
00603 /**
00604  * Gets a list of channels for which we have sender keys.
00605  *
00606  * @param outChannelNames pointer to location where array of channel name
00607  *   strings should be returned.  The array and the strings it contains
00608  *   must be destroyed by caller.
00609  *
00610  * @return the number of channel names returned (in other words, the length of
00611  *   the returned array).
00612  *
00613  * Example: <PRE>
00614  * char **channelNames;
00615  * int numChannels = k2bGetChannelsWithSenderKeys( &channelNames );
00616  * // process channel names here
00617  * ...
00618  * // now destroyed returned array
00619  * for( int i=0; i<numChannels; i++ ) {
00620  *     delete [] channelNames[i];
00621  *     }
00622  * delete [] channelNames;
00623  */
00624 int k2bGetChannelsWithSenderKeys( char ***outChannelNames );
00625 
00626 
00627 
00628 /**
00629  * Gets a list of channels for which we have receiver keys.
00630  *
00631  * @param outChannelNames pointer to location where array of channel name
00632  *   strings should be returned.  The array and the strings it contains
00633  *   must be destroyed by caller.
00634  *
00635  * @return the number of channel names returned (in other words, the length of
00636  *   the returned array).
00637  *
00638  * Example: <PRE>
00639  * char **channelNames;
00640  * int numChannels = k2bGetChannelsWithReceiverKeys( &channelNames );
00641  * // process channel names here
00642  * ...
00643  * // now destroyed returned array
00644  * for( int i=0; i<numChannels; i++ ) {
00645  *     delete [] channelNames[i];
00646  *     }
00647  * delete [] channelNames;
00648  * </PRE>
00649  */
00650 int k2bGetChannelsWithReceiverKeys( char ***outChannelNames );
00651 
00652 
00653 
00654 
00655 /**
00656  * Gets the status of any broadcast in the process of being received.
00657  *
00658  * When these broadcasts are completely received, they will be
00659  * copied into the received folder and into the appropriate channel
00660  * sub-folder.
00661  *
00662  * @param outChannelNames location where the channel names for the pending
00663  *   broadcasts should be returned.
00664  *   The array and the strings it contains must be destroyed by caller.
00665  * @param outBroadcastNames location where the broadcast names for the pending
00666  *   broadcasts should be returned.
00667  *   The array and the strings it contains must be destroyed by caller.
00668  * @param outComments location where the comments for the pending broadcasts
00669  *   should be returned.
00670  *   The array and the strings it contains must be destroyed by caller.
00671  * @param outContentTypes location where the content types for the
00672  *   pending broadcasts should be returned.
00673  *   The array and the strings it contains must be destroyed by caller.
00674  * @param outContentLengthsInBytes pointer to location where array of
00675  *   content lengths for each broadcast should be returned. 
00676  *   Must be destroyed by caller.
00677  * @param outFractionComplete pointer to location where array of
00678  *   fraction complete values for each Broadcast should be returned. 
00679  *   Must be destroyed by caller.
00680  * @param outKiBPerSecond pointer to location where array of
00681  *   KiB/sec transfer speed values for each Broadcast should be returned. 
00682  *   Must be destroyed by caller.
00683  * @param outCancelFlags pointer to location where array of
00684  *   cancel flags (true iff cancel pending) for each Broadcast should be
00685  *   returned. 
00686  *   Must be destroyed by caller.
00687  *
00688  * @return the number of Broadcasts pending (in other words, the length of
00689  *   each of the returned arrays).
00690  *
00691  * Example: <PRE>
00692  * char **pendingChannelNames;
00693  * char **pendingBroadcastNames;
00694  * char **pendingComments;
00695  * char **pendingContentTypes;
00696  * unsigned long *pendingContentLengths;
00697  * float *fractionComplete;
00698  * float *pendingSpeeds;
00699  * char *cancelFlags;
00700  *
00701  * int numPending = k2bGetPendingBroadcastStatus( &pendingChannelNames,
00702  *                                                &pendingBroadcastNames,
00703  *                                                &pendingComments,
00704  *                                                &pendingContentTypes,
00705  *                                                &pendingContentLengths,
00706  *                                                &fractionComplete,
00707  *                                                &pendingSpeeds,
00708  *                                                &cancelFlags );
00709  * // process pending Broadcasts here
00710  * ...
00711  * // now destroyed returned arrays
00712  * for( int i=0; i<numPending; i++ ) {
00713  *     delete [] pendingChannelNames[i];
00714  *     delete [] pendingBroadcastNames[i];
00715  *     delete [] pendingComments[i];
00716  *     delete [] pendingContentTypes[i];
00717  *     }
00718  * delete [] pendingChannelNames;
00719  * delete [] pendingBroadcastNames;
00720  * delete [] pendingComments;
00721  * delete [] pendingContentTypes;
00722  * delete [] pendingContentLengths;
00723  * delete [] fractionComplete;
00724  * delete [] pendingSpeeds;
00725  * delete [] cancelFlags;
00726  * </PRE>
00727  */
00728 int k2bGetPendingBroadcastStatus( char ***outChannelNames,
00729                                   char ***outBroadcastNames,
00730                                   char ***outComments,
00731                                   char ***outContentTypes,
00732                                   unsigned long **outContentLengthsInBytes,
00733                                   float **outFractionComplete,
00734                                   float **outKiBPerSecond,
00735                                   char **outCancelFlags );
00736 
00737 
00738 
00739 /**
00740  * Cancels receipt of a pending broadcast.
00741  *
00742  * @param inChannelName the channel the broadcast is being received on.
00743  * @param inBroadcastName the name of the pending broadcast.
00744  */
00745 void k2bCancelPendingBroadcast( char *inChannelName,
00746                                 char *inBroadcastName );
00747 
00748 
00749 
00750 #endif
00751 
00752 

Generated at Tue Oct 29 12:29:29 2002 for konspire2b API by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001