diff options
author | Allmann-Rahn <allmann-rahn@ubuntu.ubuntu-domain> | 2011-08-22 11:39:37 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-08-23 17:36:50 +0100 |
commit | fbc30846acc2391a4c323c07ea04b308a685ce46 (patch) | |
tree | 83da7330222d751cfed20898f79f3b7a8d9b4ebe /automation/inc | |
parent | c02eaf4bb94b2c81f6f27d7af665b344c2e1370a (diff) |
Translated German comments and removed the redundant ones in the directories accessibility to (incl.) basebmp.
Diffstat (limited to 'automation/inc')
-rw-r--r-- | automation/inc/automation/commdefines.hxx | 33 | ||||
-rw-r--r-- | automation/inc/automation/communi.hxx | 14 | ||||
-rw-r--r-- | automation/inc/automation/simplecm.hxx | 48 |
3 files changed, 45 insertions, 50 deletions
diff --git a/automation/inc/automation/commdefines.hxx b/automation/inc/automation/commdefines.hxx index 24ca05809034..7b6d62b47b5c 100644 --- a/automation/inc/automation/commdefines.hxx +++ b/automation/inc/automation/commdefines.hxx @@ -91,29 +91,28 @@ #endif // OSL_LITENDIAN /** - Es gibt zwei arten von Datenpaketen - die erste enthlt in den ersten 4 Byte die Lngenangabe und in den Darauffolgenden die Daten - Die Lngenangabe bezieht sich nur auf die Daten ohne die Lngenangabe selbst. + There are two types of data packages: + The first one contains in the first 4 bytes the length information and in the following the data. + The length information refers to the data only, without the length information itself. - Die Zweite Art von Datenpaketen enthlt Header mit weitere Informationen - wie unten beschrieben. + The second type of data packages contains headers with further information as described below. - Umgeschaltet wird mit dem Boolean bUseMultiChannel im Konstruktor des Managers. + It's switched with the Boolean bUseMultiChanell in the manager's constructor. **/ /** -Defines fr Header Typen: +Defines for header types: -Allgemeiner Header: - Byte Lnge Inhalt - 0..3 4 Lnge des Paketes ohne diese 4 Byte - 4 1 Prfsumme ber die Lnge. Stimmt sie nicht wird die Verbindung geschlossen - 5..6 2 Lnge des Headers ohne diese 2 Byte - 7..8 2 Typ des Headers +general header: + bytes length content + 0..3 4 the package's length without these 4 bytes + 4 1 Checksum concerning the length. If it's incorrect, the connection is closed. + 5..6 2 length of the header without these 2 bytes + 7..8 2 type of the header CH_SimpleMultiChannel: - 9..10 2 Channel + 9..10 2 channel CH_Handshake Internal Use ONLY - Keine Weiteren Daten! + No further data! **/ typedef comm_UINT16 CMProtocol; @@ -130,8 +129,8 @@ typedef comm_UINT16 CommunicationOption; #define CH_SimpleMultiChannel 0x0001 #define CH_Handshake 0x0002 -#define CH_REQUEST_HandshakeAlive ((HandshakeType)0x0101) /// Fordert eine Alive Antwort an -#define CH_RESPONSE_HandshakeAlive ((HandshakeType)0x0102) /// Alive Antwort +#define CH_REQUEST_HandshakeAlive ((HandshakeType)0x0101) /// aks for alive reply +#define CH_RESPONSE_HandshakeAlive ((HandshakeType)0x0102) /// alive reply /** Announce supported options: diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx index 68cb3cbeaf21..c416d771af6f 100644 --- a/automation/inc/automation/communi.hxx +++ b/automation/inc/automation/communi.hxx @@ -58,8 +58,8 @@ protected: virtual void CallConnectionOpened( CommunicationLink* pCL ); virtual void CallConnectionClosed( CommunicationLink* pCL ); CommunicationLinkList *ActiveLinks; - CommunicationLinkList *InactiveLinks; /// Hier sind die CommunicationLinks drin, die sich noch nicht selbst abgemeldet haben. - /// allerdings schon ein StopCommunication gekriegt haben, bzw ein ConnectionTerminated + CommunicationLinkList *InactiveLinks; /// CommunicationLinks that have not yet logged off themselves but already have received + /// a StopCommunication or a ConnectionTerminated virtual void DestroyingLink( CommunicationLink *pCL ); sal_Bool bGracefullShutdown; @@ -86,7 +86,7 @@ public: virtual sal_Bool IsCommunicationError(); virtual sal_Bool DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); - // Diese sind Virtuelle Links!!!! + // These are virtual links! virtual long ConnectionClosed( void* = NULL ); virtual long DataReceived( void* = NULL ); @@ -102,8 +102,8 @@ protected: virtual sal_Bool ShutdownCommunication(); sal_uLong nConnectionClosedEventId; sal_uLong nDataReceivedEventId; - osl::Mutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist - osl::Mutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist + osl::Mutex aMConnectionClosed; // necessary because no event can be managed before the variable is set + osl::Mutex aMDataReceived; // necessary because no event can be managed before the variable is set virtual void WaitForShutdown(); DECL_LINK( ShutdownLink, void* ); @@ -150,11 +150,11 @@ private: sal_uLong nPortToListen; sal_uInt16 nMaxConnections; sal_uLong nAddConnectionEventId; - osl::Mutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist + osl::Mutex aMAddConnection; // necessary because no event can be managed before the variable is set void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); } CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); } - // Diese beiden werden zum Transport der Connection vom Thread zum Mainthread verwendet. + // these are used for the connection's transport from the thread to the mainthread CommunicationLinkRef xmNewConnection; DECL_LINK( AddConnection, void* ); }; diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index 9a5211b1ad37..96e55caef8b7 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -37,7 +37,7 @@ #include <automation/commdefines.hxx> -// CM steht f�r CommunicationManager +// CM stands for CommunicationManager #define CM_UNLIMITED_CONNECTIONS 0xffff typedef sal_uInt16 CM_NameType; @@ -45,7 +45,7 @@ typedef sal_uInt16 CM_NameType; #define CM_FQDN ( (CM_NameType) 02 ) typedef sal_uInt16 CM_InfoType; -// nur eines dieser 3 defines darf verwendet werden +// only one of these three defines may be used #define CM_NO_TEXT ( (CM_InfoType) 01 ) #define CM_SHORT_TEXT ( (CM_InfoType) 02 ) #define CM_VERBOSE_TEXT ( (CM_InfoType) 03 ) @@ -122,9 +122,9 @@ protected: friend class CommunicationManager; friend class MultiCommunicationManager; friend class CommunicationManagerServerAcceptThread; - // Darf nicht abger�umt werden zwischen Empfang des Streams und ende des Callbacks + // may not be stopped between the stream's reception and the callback's end -protected: // so da� nur �ber Ref gel�scht werden kann +protected: // so that it can only be deleted via Ref virtual ~CommunicationLink(); void InvalidateManager() { pMyManager = NULL; } @@ -137,13 +137,10 @@ public: virtual sal_Bool IsCommunicationError()=0; CommunicationManager* GetCommunicationManager(){ return pMyManager; } -// Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren virtual ByteString GetCommunicationPartner( CM_NameType eType )=0; -// Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren virtual ByteString GetMyName( CM_NameType eType )=0; -// Liefert einen neuen Stream zum Versenden von Daten. virtual SvStream* GetBestCommunicationStream()=0; /** will call virtual function DoTransferDataStream to do actual work @@ -151,20 +148,20 @@ public: **/ sal_Bool TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol = CM_PROTOCOL_OLDSTYLE ); - // Liefert die ID, die vom Sender angegeben wurde. - // Dadurch lassen sich virtuelle Kommunikationen �ber einen physikalischen Link realisiren. - // Da die Kommunikation zu �lteren Versionen kompatibel bleiben mu�, mu� der Empf�nger raten, - // die neue oder die alte verwendet wird, da sich der Kopf eines Auftrages dann �ndert. + // delivers the ID that is named by the server + // Due to that virtual communications over a physical link can be realised. + // Because the communication must remain compatible to older versions the receiver must guess whether + // the new or the old one is used because the order's head changes then sal_uInt16 GetProtocol(){ return nServiceProtocol; } - // Der Stream wird hier �bergeben. Der Aufrufer ist f�r dessen L�schung zust�ndig - // Die Methode MUSS gerufen werden, da sonst keine weiteren Daten empfangen werden. + // Commits the stream. The caller is responsible for the deletion. + // The method must be called because there would be no further data received otherwise. SvStream* GetServiceData(){ SvStream *pTemp = pServiceData; pServiceData = NULL; return pTemp; } - /// Erm�glicht das Ausl�sen des n�chsten Callbacks. Wird auch Implizit gerufen. + /// Allows for the release of the next callbacks. Is also called implicitly. void FinishCallback(){ bIsInsideCallback = sal_False; } - /// Syncrones Empfangen der Daten. Nur f�r Kommandozeile, sonst leer implementiert + /// Synchronous reception of the data. Only for command line - empty implementation for other uses. virtual sal_Bool ReceiveDataStream(){ return sal_False; } /// Statistics @@ -178,7 +175,7 @@ protected: void CallInfoMsg( InfoString aMsg ); CM_InfoType GetInfoType(); CommunicationManager *pMyManager; -// Diese Methoden werden im Main Kontext gerufen und an den Manager weitergereicht. +// These methods are called in the main context and are handed over to the manager. virtual DECL_LINK( ConnectionClosed, void* = NULL ); virtual DECL_LINK( DataReceived, void* = NULL ); @@ -188,7 +185,7 @@ protected: sal_uInt16 nServiceProtocol; sal_uInt16 nServiceHeaderType; - /// Verhindert das vorzeitige Ausl�sen des n�chsten Callbacks. + /// Prevents the early release of the next callback. void StartCallback(){ bIsInsideCallback = sal_True; } sal_Bool bIsInsideCallback; @@ -227,19 +224,18 @@ public: virtual sal_Bool StartCommunication()=0; virtual sal_Bool StartCommunication( String aApp, String aParams ); virtual sal_Bool StartCommunication( ByteString aHost, sal_uLong nPort ); - virtual sal_Bool StopCommunication()=0; // H�lt alle CommunicationLinks an + virtual sal_Bool StopCommunication()=0; virtual sal_Bool IsCommunicationRunning() { return bIsCommunicationRunning; } // virtual sal_Bool IsCommunicationError(); -// Der Name oder die IP-Adresse oder sonstwas um den Communikationspartner zu identifizieren + virtual ByteString GetMyName( CM_NameType eType ); - virtual sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // Notwendig f�r call im Destruktor + virtual sal_Bool IsLinkValid( CommunicationLink* pCL )=0; // necessary for call in destructor virtual sal_uInt16 GetCommunicationLinkCount()=0; virtual CommunicationLinkRef GetCommunicationLink( sal_uInt16 nNr )=0; - // Liefert den letzten neuen Link oder NULL wenn dieser schon wieder geschlossen ist. CommunicationLinkRef GetLastNewLink() { return xLastNewLink; } void SetConnectionOpenedHdl( Link lConnectionOpened ){ mlConnectionOpened = lConnectionOpened; } @@ -255,8 +251,8 @@ public: const ByteString& GetApplication() { return maApplication; } protected: - // Diese Methoden werden innerhalb gerufen. Sie erledigen eventuelles Housekeeping - // und rufen dann die entsprechende Methode + // These methods are called inside. They care for housekeeping if applicable + // and call the respective method then. virtual void CallConnectionOpened( CommunicationLink* pCL ); virtual void CallConnectionClosed( CommunicationLink* pCL ); void CallDataReceived( CommunicationLink* pCL ); @@ -264,7 +260,7 @@ protected: CM_InfoType nInfoType; - // Diese Routinen rufen den Link oder sind �berladen + // These routines call the link or are overloaded. virtual void ConnectionOpened( CommunicationLink* pCL ){ mlConnectionOpened.Call( pCL ); } virtual void ConnectionClosed( CommunicationLink* pCL ){ mlConnectionClosed.Call( pCL ); } virtual void DataReceived( CommunicationLink* pCL ){ mlDataReceived.Call( pCL ); } @@ -272,7 +268,7 @@ protected: sal_Bool bIsCommunicationRunning; - virtual void DestroyingLink( CommunicationLink *pCL )=0; // Link tr�gt sich im Destruktor aus + virtual void DestroyingLink( CommunicationLink *pCL )=0; private: ByteString maApplication; @@ -289,7 +285,7 @@ class ICommunicationManagerClient { friend class CommonSocketFunctions; protected: - virtual sal_Bool RetryConnect() { return sal_False; } // Kann dann eventuell die Applikation starten + virtual sal_Bool RetryConnect() { return sal_False; } // might be able to start the application }; class TCPIO; |