| 1934 | } |
| 1935 | |
| 1936 | int RemoteServer::GetSectionCount() |
| 1937 | { |
| 1938 | if(!Connected()) |
| 1939 | return 0; |
| 1940 | |
| 1941 | { |
| 1942 | WRITE_DATA_SCOPE(); |
| 1943 | SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetSectionCount); |
| 1944 | } |
| 1945 | |
| 1946 | int count = 0; |
| 1947 | |
| 1948 | { |
| 1949 | READ_DATA_SCOPE(); |
| 1950 | RemoteServerPacket type = ser.ReadChunk<RemoteServerPacket>(); |
| 1951 | |
| 1952 | if(type == RemoteServerPacket::GetSectionCount) |
| 1953 | { |
| 1954 | SERIALISE_ELEMENT(count); |
| 1955 | } |
| 1956 | else |
| 1957 | { |
| 1958 | RDCERR("Unexpected response to GetSectionCount"); |
| 1959 | } |
| 1960 | |
| 1961 | ser.EndChunk(); |
| 1962 | } |
| 1963 | |
| 1964 | return count; |
| 1965 | } |
| 1966 | |
| 1967 | int RemoteServer::FindSectionByName(const rdcstr &name) |
| 1968 | { |