qtms/src/qtmsg729impl.cpp
changeset 50 762d760dcfdf
parent 27 cbb1bfb7ebfb
equal deleted inserted replaced
48:b7b49303d0c0 50:762d760dcfdf
    22 
    22 
    23 using namespace QTMS;
    23 using namespace QTMS;
    24 using namespace TMS;
    24 using namespace TMS;
    25 
    25 
    26 QTMSG729FormatImpl::QTMSG729FormatImpl()
    26 QTMSG729FormatImpl::QTMSG729FormatImpl()
    27     {
    27 {
    28     }
    28 }
    29 
    29 
    30 QTMSG729FormatImpl::~QTMSG729FormatImpl()
    30 QTMSG729FormatImpl::~QTMSG729FormatImpl()
    31     {
    31 {
    32     TRACE_PRN_FN_ENT;
    32     TRACE_PRN_FN_ENT;
    33     TRACE_PRN_FN_EXT;
    33     TRACE_PRN_FN_EXT;
    34     }
    34 }
    35 
    35 
    36 gint QTMSG729FormatImpl::Create(QTMSFormat*& qformat,
    36 gint QTMSG729FormatImpl::Create(QTMSFormat*& qformat, TMS::TMSFormat*& tmsformat)
    37         TMS::TMSFormat*& tmsformat)
    37 {
    38     {
       
    39     gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
    38     gint ret(QTMS_RESULT_INSUFFICIENT_MEMORY);
    40     QTMSG729FormatImpl* self = new QTMSG729FormatImpl();
    39     QTMSG729FormatImpl* self = new QTMSG729FormatImpl();
    41     if (self)
    40     if (self) {
    42         {
       
    43         ret = self->PostConstruct();
    41         ret = self->PostConstruct();
    44         if (ret != QTMS_RESULT_SUCCESS)
    42         if (ret != QTMS_RESULT_SUCCESS) {
    45             {
       
    46             delete self;
    43             delete self;
    47             self = NULL;
    44             self = NULL;
    48             }
    45         }
    49         self->iFormat = tmsformat;
    46         self->iFormat = tmsformat;
    50         }
    47     }
    51     qformat = self;
    48     qformat = self;
    52     return ret;
    49     return ret;
    53     }
    50 }
    54 
    51 
    55 gint QTMSG729FormatImpl::PostConstruct()
    52 gint QTMSG729FormatImpl::PostConstruct()
    56     {
    53 {
    57     gint ret(QTMS_RESULT_SUCCESS);
    54     gint ret(QTMS_RESULT_SUCCESS);
    58     return ret;
    55     return ret;
    59     }
    56 }
    60 
    57 
    61 gint QTMSG729FormatImpl::GetFormat(TMS::TMSFormat*& fmt)
    58 gint QTMSG729FormatImpl::GetFormat(TMS::TMSFormat*& fmt)
    62     {
    59 {
    63     gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
    60     gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT);
    64 
    61 
    65     if (iFormat)
    62     if (iFormat) {
    66         {
       
    67         fmt = iFormat;
    63         fmt = iFormat;
    68         ret = QTMS_RESULT_SUCCESS;
    64         ret = QTMS_RESULT_SUCCESS;
    69         }
    65     }
    70     return ret;
    66     return ret;
    71     }
    67 }
    72 
    68 
    73 gint QTMSG729FormatImpl::GetType(QTMSFormatType& fmttype)
    69 gint QTMSG729FormatImpl::GetType(QTMSFormatType& fmttype)
    74     {
    70 {
    75     gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
    71     gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
    76     if (iFormat)
    72     if (iFormat) {
    77         {
       
    78         status = iFormat->GetType(fmttype);
    73         status = iFormat->GetType(fmttype);
    79         }
    74     }
    80     return status;
    75     return status;
    81     }
    76 }
    82 
    77 
    83 // End of file
    78 // End of file