pstaospeaker.cpp
来自「基于sipfoundy 公司开发的sipx协议API」· C++ 代码 · 共 85 行
CPP
85 行
//// Copyright (C) 2004, 2005 Pingtel Corp.// //// $$//////////////////////////////////////////////////////////////////////////////// SYSTEM INCLUDES#include <assert.h>// APPLICATION INCLUDES#include "ps/PsTaoSpeaker.h"#include <os/OsLock.h>// EXTERNAL FUNCTIONS// EXTERNAL VARIABLES// CONSTANTS// STATIC VARIABLE INITIALIZATIONS/* //////////////////////////// PUBLIC //////////////////////////////////// *//* ============================ CREATORS ================================== */// ConstructorPsTaoSpeaker::PsTaoSpeaker(){ mVolume = 0;}PsTaoSpeaker::PsTaoSpeaker(const UtlString& rComponentName, int componentType) :PsTaoComponent(rComponentName, componentType){ mVolume = 0;}// Copy constructorPsTaoSpeaker::PsTaoSpeaker(const PsTaoSpeaker& rPsTaoSpeaker){ mVolume = rPsTaoSpeaker.mVolume;}// DestructorPsTaoSpeaker::~PsTaoSpeaker(){}/* ============================ MANIPULATORS ============================== */// Assignment operatorPsTaoSpeaker&PsTaoSpeaker::operator=(const PsTaoSpeaker& rhs){ if (this == &rhs) // handle the assignment to self case return *this; return *this;}OsStatus PsTaoSpeaker::setVolume(int volume){ if (0 <= volume && volume <= 100) mVolume = volume; osPrintf("===== PsTaoSpeaker::setVolume: mVolume = %d volume = %d\n", mVolume, volume); return OS_SUCCESS;}/* ============================ ACCESSORS ================================= */OsStatus PsTaoSpeaker::getVolume(int& rVolume){ rVolume = mVolume; osPrintf("===== PsTaoSpeaker::getVolume: mVolume = %d volume = %d\n", mVolume, rVolume); return OS_SUCCESS;}/* ============================ INQUIRY =================================== *//* //////////////////////////// PROTECTED ///////////////////////////////// *//* //////////////////////////// PRIVATE /////////////////////////////////// *//* ============================ FUNCTIONS ================================= */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?