Stream Class Reference

#include <switch_cpp.h>

Collaboration diagram for Stream:

[legend]

Public Member Functions

 Stream (void)
 Stream (switch_stream_handle_t *)
virtual ~Stream ()
void write (const char *data)
const char * get_data (void)

Protected Attributes

switch_stream_handle_t mystream
switch_stream_handle_tstream_p
int mine

Detailed Description

Definition at line 140 of file switch_cpp.h.


Constructor & Destructor Documentation

Stream::Stream ( void   ) 

Definition at line 479 of file switch_cpp.cpp.

References mine, mystream, stream_p, and SWITCH_STANDARD_STREAM.

00480 {
00481         SWITCH_STANDARD_STREAM(mystream);
00482         stream_p = &mystream;
00483         mine = 1;
00484 }

Stream::Stream ( switch_stream_handle_t  ) 

Definition at line 486 of file switch_cpp.cpp.

References mine, and stream_p.

00487 {
00488         stream_p = sp;
00489         mine = 0;
00490 }

Stream::~Stream (  )  [virtual]

Definition at line 493 of file switch_cpp.cpp.

References switch_stream_handle::data, mine, mystream, and switch_safe_free.

00494 {
00495         if (mine) {
00496                 switch_safe_free(mystream.data);
00497         }
00498 }


Member Function Documentation

const char * Stream::get_data ( void   ) 

Definition at line 506 of file switch_cpp.cpp.

References this_check.

00507 {
00508         this_check("");
00509 
00510         return stream_p ? (const char *)stream_p->data : NULL;
00511 }

void Stream::write ( const char *  data  ) 

Definition at line 500 of file switch_cpp.cpp.

References this_check_void.

00501 {
00502         this_check_void();
00503         stream_p->write_function(stream_p, "%s", data);
00504 }


Field Documentation

int Stream::mine [protected]

Definition at line 144 of file switch_cpp.h.

Referenced by Stream(), and ~Stream().

switch_stream_handle_t Stream::mystream [protected]

Definition at line 142 of file switch_cpp.h.

Referenced by Stream(), and ~Stream().

switch_stream_handle_t* Stream::stream_p [protected]

Definition at line 143 of file switch_cpp.h.

Referenced by Stream().


The documentation for this class was generated from the following files:
Generated on Wed May 16 04:00:25 2012 for FreeSWITCH API Documentation by  doxygen 1.4.7